LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

csv-diff

compare CSV files and show differences

TLDR

Diff two CSV files
$ csv-diff [old.csv] [new.csv]
copy
Diff with specific key column
$ csv-diff [old.csv] [new.csv] --key [id]
copy
Output as JSON
$ csv-diff [old.csv] [new.csv] --json
copy
Show only changes
$ csv-diff [old.csv] [new.csv] --show-unchanged
copy

SYNOPSIS

csv-diff [options] old.csv new.csv

DESCRIPTION

csv-diff compares two CSV, TSV, or JSON files and shows added, removed, and changed rows. It's useful for tracking changes in data exports, database dumps, or any tabular data.A --key column must be specified so rows can be matched across files. Output is human-readable by default, and machine-readable JSON is available via --json.The tool is a standalone Python package by Simon Willison, installable via `pip install csv-diff`. It is distinct from csvkit.

PARAMETERS

--key column

Column to use as unique identifier.
--json
Output in JSON format.
--show-unchanged
Include unchanged rows in output.
--singular name
Singular noun for rows.
--plural name
Plural noun for rows.

CAVEATS

Rows without a stable unique key cannot be meaningfully compared; choose a column guaranteed to be present on both sides. Large files are loaded fully into memory.

SEE ALSO

csvkit(1), diff(1), jq(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid