Your CSV loaded fine — and your numbers are still wrong

The file imported without a single error. Then the dashboard said Texas was three different states, revenue was double-counted, and a whole month of orders vanished from the report.

None of those problems error on load. A duplicate row, a bad email, an impossible date, a negative amount — they all load cleanly and sit there, quietly wrong. That is the whole problem with CSV data quality: the failure mode is silence.

I built a free tool that finds these defects before the file goes anywhere near a database: CSV Data Quality Checker for Analysts.

TL;DR

Hand it any CSV. A stdlib-only Python script runs seven deterministic checks — missing values, duplicate rows, bad dates, invalid emails, out-of-range numbers, inconsistent casing, empty rows — and emits a ranked findings report with a 0–100 quality score and a concrete fix per finding. A second script validates the report before delivery. No data leaves your machine, and the input file is never modified.

How it works

The audit is script-first. The pipeline reads the CSV line by line (blank lines are kept, so empty rows are actually detected instead of silently skipped by the CSV reader) and runs one check per defect type:

EMAIL_RE = re.compile(r"^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$") # Dates must be real YYYY-MM-DD dates — "2026-13-01" fails here datetime.strptime(value, "%Y-%m-%d") # Amounts must be numbers inside 0–10,000 (a default for small order files) amount = float(value) if amount < 0.0 or amount > 10_000.0: flag("OUT_OF_RANGE") 

Duplicate detection is exact-match on the full row, flagged on the later occurrence so the first copy is always kept. Casing is checked only on columns with a known vocabulary — state, city, country — because title-casing free-text names would break real names like McDonald.

Every finding carries its row, column, severity, the rule that fired, the evidence, and a fix. The quality score starts at 100 and deducts 8 per High finding, 4 per Medium, 2 per Low. The validator then recomputes the score from the findings and checks the schema, the ranked order, and that the counts are internally consistent.

The proof

Real dry run on the included fictional 12-row sample — 8 findings, score 56/100:

  • High: row 3, carol.nguyen@example — invalid email (no top-level domain); row 4, 2026-13-01 — impossible date; row 7, amount -45.00 — out of range; row 9 — exact duplicate of row 2, same order exported twice
  • Medium: row 5 — missing email; row 11 — a completely blank row mid-file
  • Low: row 6, texas; row 12, CALIFORNIA — same state, three casings
  • Clean: rows 1, 2, 8, 10. Validator: 0 errors.

The single most useful finding in that list is the duplicate. A duplicate order row double-counts revenue, and nothing in a normal import will ever tell you. The 30-second version of this whole skill: sort your CSV by its ID column and look for repeats.

Limits, honestly

These are heuristic checks — they catch the common defects, not every data-quality problem. They cannot see business rules (whether an amount is plausible for a given product) or join against a source system, so an out-of-range or duplicate finding is a candidate until you confirm it at the source. And the 0–10,000 amount range is a default for small sales files; if your data legitimately exceeds it, the range is wrong, not your data.

The deeper rule: fix defects at the source, not in the file. A CSV you patch by hand will be dirty again on the next export. Use the report as a punch list for the source system, re-run the audit on the next export, and watch the score move.

Try it

It's free (MIT licensed) — a lead magnet, and I mean that plainly: I built it to be useful first.

Run it against your next export before you load it. What's the worst thing a dirty CSV has done to one of your dashboards?