larsyencken / csvdiff

Generate a diff between two tabular datasets expressed in CSV files.
BSD 3-Clause "New" or "Revised" License
132 stars 31 forks source link

Create multiple indices #44

Closed AthreyVinay closed 5 years ago

AthreyVinay commented 5 years ago

Hi -- I was just wondering if there is a way to specify multiple indices for comparing.

for eg : csvdiff --style=pretty --output=diff.json -k element_name,parent_category a.csv b.csv

where -k specifies keys. Thanks in advance.

AthreyVinay commented 5 years ago

Closing this now since I was able to use the API's entry point - import csvdiff patch = csvdiff.diff_files('a.csv', 'b.csv', ['element_name', 'parent_category'])

got this solved. Thanks!

larsyencken commented 5 years ago

You can comma-separate the indexing columns on the command-line, like:

csvdiff --style=pretty --output=diff.json element_name,parent_category a.csv b.csv

Just without the -k should work

AthreyVinay commented 5 years ago

perfect - thank you!