CsvCompare
- class csvcomparer.CsvCompare(left_csv_path: str, right_csv_path: str, index_col: List[str], *, kwargs: dict = {}, read_csv_kwargs: dict = {})
- property cols_added: List[str]
Columns added to the “right” file.
- Returns:
List[str]: Set difference between the left file’s column names and the right file’s column names.
- property cols_removed: List[str]
Columns removed from the “left” file.
- Returns:
List[str]: Set difference between the right file’s column names and the left file’s column names.
- property diffs: csvcomparer.CsvCompareDiffs
Accumulation of all differences found between files.
- property rows_added: Dict[str, Dict[str, Any]]
Rows added to the “right” file.
- Returns:
Dict[str, Dict[str, Any]]: Rows in the right file where the index is the set difference between the right file’s index and the left_file’s index.
- property rows_changed: Dict[str, List[Dict[str, Any]]]
Rows with fields that have different values between files.
- Returns:
Dict[str, List[Dict[str, Any]]]: Field value differences for rows/columns in common between left and right files.
- property rows_removed: Dict[str, Dict[str, Any]]
Rows removed from the “left” file.
- Returns:
Dict[str, Dict[str, Any]]: Rows in the left file where the index is the set difference between the left file’s index and the right_file’s index.