← Docs
Recipe

Recipe: Messy CSV → clean data

Strip BOMs, normalize headers, dedupe rows, and export sanitized CSV in one pass.

Ingredients

  • A CSV file with inconsistent headers, blank rows, or duplicate entries
  • Meridian installed and authenticated
  • Terminal access (PowerShell or bash)

Steps

  1. Drop the file — place your CSV in~/meridian/inbox/
  2. Run the cleaner:
    meridian clean-csv --input messy.csv --output clean.csv
  3. Review the report — Meridian prints rows dropped, headers normalized, and encoding fixed.
  4. Verify output — openclean.csvin your spreadsheet app.

Flags

FlagPurpose
--dedupeRemove duplicate rows by content hash
--trimStrip leading/trailing whitespace from every cell
--lowercase-headersNormalize all column names to lowercase

Tip: Chain withmeridian validate-csvto enforce schema constraints after cleaning.