simonw / csv-diff

Python CLI tool and library for diffing CSV and JSON files
Apache License 2.0
292 stars 47 forks source link

Support using row number as a key #15

Open bernd-wechner opened 3 years ago

bernd-wechner commented 3 years ago

load_csv functions nicely without a key, using a hash of the row data.

While nice, a useful alternative that also resolves uniquely but conveys useful information is the row number. Would suggest supporting a keyword for row number as the simplest approach to implementing this. The keyword may of course be a header and if so, dropping back to using the value in the column is sound.

A candidate key might be "row" or "row_number"