csv-diff

Python CLI tool and library for diffing CSV and JSON files

APACHE-2.0 License

Downloads
123.2K
Stars
292
Committers
5

Bot releases are visible (Hide)

csv-diff - 1.1 Latest Release

Published by simonw over 3 years ago

  • Tool now also works against inputs that are JSON files consisting of a list of objects with identical keys, using --format=json. #12
csv-diff - 1.0

Published by simonw about 4 years ago

  • New --show-unchanged option for outputting the unchanged values of rows that had at least one change. #9
  • Fix for bug with column names that contained a . character. #7
  • Fix for error when no --key provided - thanks, @MainHanzo. #3
  • CSV delimiter sniffer now ; delimited files. #6
csv-diff - csv-diff 0.6

Published by simonw over 4 years ago

  • Support for TSV files. The tool will automatically detect if the input is CSV or TSV, or you can use the new --format=tsv or --format=csv options to over-ride the automatic detection. Thanks, Thomas Sibley for contributing this new feature. (#4)
csv-diff - csv-diff 0.5.1

Published by simonw over 5 years ago

Tweaked output formatting of added/removed columns for better consistency with added/removed/changed rows.

csv-diff - csv-diff 0.5

Published by simonw over 5 years ago

Handle columns being added and removed

My sf-tree-history project unexpectedly broke because the columns in the CSV file changed.

https://circleci.com/gh/simonw/sf-tree-history/110

csv-diff can now detect and handle this without crashing.

Example commit: https://github.com/simonw/sf-tree-history/commit/781d7c4abf5d0022609a2b20cd3d5f5616826835

csv-diff - csv-diff 0.4

Published by simonw over 5 years ago

--singular and --plural options, closes #2

csv-diff - csv-diff 0.3.1

Published by simonw over 5 years ago

Added and deleted rows now display in a more human-friendly format than raw JSON:

$ csv-diff one.csv two.csv --key=id
1 row changed, 1 row added, 1 row removed

1 row changed

  Row 1
    age: "4" => "5"

1 row added

  id: 3
  name: Bailey
  age: 1

1 row removed

  id: 2
  name: Pancakes
  age: 2

Example commit here: https://github.com/simonw/sf-tree-history/commit/184efa - compare with https://github.com/simonw/sf-tree-history/commit/dd08cc which demonstrates the previous behaviour.

csv-diff - csv-diff 0.2

Published by simonw over 5 years ago

Changed the order of the human text output: it's now changed, added, removed

I did this so that this commit message would be more interesting to read once GitHub truncated it.

csv-diff - csv-diff: first release

Published by simonw over 5 years ago