Your Cart
Loading

CSV Repair Kit: clean messy spreadsheets and log every fix (a Localpane Starter)

On Sale
$29.00
$29.00
Added to cart

Keep receiving broken CSV exports? This starter turns "open it in a spreadsheet and fix it by hand" into one repeatable command. Describe your file in a short JSON config (column types, required fields, date formats, dedupe keys), run it, and get a clean CSV, a quarantine file for rows it refuses to guess about, and a repair log with every change: row, column, rule, before, after. A replay check re-applies the log to your original and confirms it reproduces the clean file. Optionally load the result into SQLite. Plain Python, no packages to install, three worked examples with invented data, 67 tests. Read it, change it, make it yours.


What's inside

  • csvrepair/: the tool, about 1,450 lines of readable Python (standard library only)
  • Config-driven schema: 8 column types (string, integer, decimal, date, boolean, enum, email, phone), required fields, null markers, defaults, header aliases, patterns, ranges, date formats, dedupe keys with three conflict policies
  • Outputs per run: clean.csv, quarantine.csv, repair-log.csv, outcomes.csv, report.json, report.md
  • A replay check that verifies the log against your original file, and the identity input rows = clean + quarantined + discarded
  • Optional SQLite load: typed table, indexes you choose, plus the repair log and quarantine as tables
  • draft command that sketches a config from your CSV
  • Three worked examples (shipments, CRM contacts, timesheets) with invented sample files and the exact expected outputs
  • 67 tests, check.sh, a "Start here" guide and a config reference


Who it's for

Freelance analysts, ops and admin staff and small-business data people who receive CSV exports with mixed date formats, stray spaces, currency symbols, duplicate rows and typos, and want a fix that is repeatable and explainable. Also anyone who wants a small, readable example of conservative data cleaning to adapt.

Not for: very large files (the tool keeps the file in memory; the default cap is 200,000 rows), Excel workbooks (save as CSV first), fuzzy matching or record linkage, or anyone who wants a tool to guess missing values. It makes no guarantee that your data is right afterwards; it shows what it did and sets aside what it will not guess.


Prerequisites

  • Python 3.9 or newer; nothing to install
  • Tested on macOS (Apple Silicon) with Python 3.9.6 and 3.12.15. Linux and Windows are not yet tested
  • Comfort with a terminal and with editing a JSON file


Good to know

  • This is a starter, not a hosted service or an app with a screen. It is a command-line tool.
  • All sample data is invented (reserved example domains, 555-01xx phone numbers).
  • The licence is single-developer; cleaned output belongs to the buyer.
  • The kit is a new, generalised implementation of an idea from the author's own shipments CSV-cleaning practice project; it does not reuse that project's code or data.


Licence

Single-developer licence, one-time purchase. Cleaned output belongs to the buyer.


Refunds: within 14 days of purchase if a file is defective or not as described. Contact me through the store's Contact button. This doesn't affect any rights you have under the law where you live.

Licence summary: payhip.com/u1791141470733132530294/licences

You will get a ZIP (75KB) file