csvdiff package¶
Submodules¶
csvdiff.error module¶
csvdiff.patch module¶
The the patch format.
-
csvdiff.patch.
apply
(diff, recs, strict=True)[source]¶ Transform the records with the patch. May fail if the records do not match those expected in the patch.
-
csvdiff.patch.
create
(from_records, to_records, index_columns, ignore_columns=None)[source]¶ Diff two sets of records, using the index columns as the primary key for both datasets.
-
csvdiff.patch.
filter_significance
(diff, significance)[source]¶ Prune any changes in the patch which are due to numeric changes less than this level of significance.
-
csvdiff.patch.
is_valid
(diff)[source]¶ Validate the diff against the schema, returning True if it matches, False otherwise.
csvdiff.records module¶
Module contents¶
-
csvdiff.
diff_files
(from_file, to_file, index_columns, sep=', ', ignored_columns=None)[source]¶ Diff two CSV files, returning the patch which transforms one into the other.
-
csvdiff.
diff_records
(from_records, to_records, index_columns)[source]¶ Diff two sequences of dictionary records, returning the patch which transforms one into the other.