Why datasets differ, not just that they do
wherefore is an open-source CLI that compares two datasets — two CSVs, two database tables, a source and a target in a migration — and explains which specific, known failure pattern caused each difference, instead of handing you a raw list of unequal cells.
Try it live →The problem
Every data migration, ETL pipeline, and system cutover eventually produces the same question: "why don't these two datasets match?" Most diff tools answer half of that — they tell you that row 47 is different, or that column X has 12 mismatches — and stop there. Someone still has to open both files side by side and manually work out whether it's a timezone bug, a truncated field, a dropped column, or something else entirely.
The approach
wherefore runs a deterministic taxonomy of known data-failure patterns against the comparison — truncation, null coercion, enum drift, timezone shifts, schema/column drift, deduplication failures, reformatted keys — and reports which pattern's statistical signature actually matches each mismatch, with a confidence score. That detection is entirely rule-based: no model call, no guessing, fully reproducible.
An optional layer on top can call Claude to write a plain-English narrative explaining the likely cause — but the underlying detection never depends on it. Every finding you see in the live demo is deterministic first; the narrative, when present, is additive.
What it's built on
wherefore wraps datacompy, Capital One's open-source dataframe comparison library, for the actual row/column matching — then adds the pattern-detection and explanation layer on top. It's a CLI-first tool: no server, no account, works against local files or a real database connection (SQLite, PostgreSQL).
What it supports today
| Source | Details |
|---|---|
| Files | .csv, .json, .parquet, .xlsx / .xls |
| Cloud storage | s3:// paths, same file types as above |
| Databases | SQLite and PostgreSQL, via db://table connection strings — single table or a whole batch with compare-dir |
| Detected patterns | Truncation, null coercion, enum drift, timezone shift, float precision, encoding mismatch, dedup failure, key mismatch, schema/column drift |
Full docs, flags, and source: github.com/tracelore/wherefore
Performance
Measured directly (wall-clock, real CLI runs) on a MacBook Pro (Apple M5 Max) — see PERFORMANCE.md for full methodology, more tiers, and database/S3 results.
| Rows compared | CSV | Parquet |
|---|---|---|
| 10,000 | 0.48s | 1.59s |
| 100,000 | 0.60s | 0.53s |
| 500,000 | 1.33s | 0.93s |
| 1,000,000 | 2.26s | 1.46s |
Get it
pip install wherefore or brew install tracelore/wherefore/wherefore