openclean_metanome.converter module¶
Helper functions to prepare inputs and read outputs when running Metanome algorithms on the contents of pandas data frames.
- openclean_metanome.converter.read_json(filename: str) → Union[Dict, List]¶
Read a JSON object or list from the given output file. By convention, the Java wrapper for Metanome algorithms stores all algorithm as JSON seriaizations.
- filename: string
Path to the input file on disk.
- Returns
- Return type
dict or list
- openclean_metanome.converter.write_dataframe(df: pandas.core.frame.DataFrame, filename: str) → Dict¶
Write the given data frame to a CSV file. The column names in the resulting CSV file are replaced by unique names (to account for possible duplicate columns in the input data frame).
The created file is a standard CSV file with the default settings for delimiter, quote char and escape char.
Returns the pmapping of unique column names to the original columns in the given data frame.
- Parameters
df (pd.DataFrame) – Data frame that is written to disk.
- Returns
- Return type
dict