Guide produit · 7 min de lecture
Fixing ragged CSV rows when column counts drift mid-file
Why some rows have too many or too few fields, how quoting mistakes cause it, and practical triage before import or grid viewing.
Publié le 19 mars 2025 · Table
A ragged CSV has rows where the number of fields does not match the header. Parsers either drop data, shift columns, or fail entirely. The usual causes are unescaped commas inside cells, missing closing quotes, or manual edits that inserted extra separators in one line only.
Triage steps
- Compare field count per row to the header count in a script or strict validator; note the first offending line number.
- Open the raw file in a text editor and inspect that line for a broken quote pair or a stray tab.
- If the source is Excel, re-export using UTF-8 CSV and avoid merged cells in the data region.
- For recurring feeds, fix upstream ETL rather than patching each file by hand.
After repair, verify in Table
Once the file parses cleanly, load it into Table. Scan the first and last pages, toggle column visibility, and confirm numeric columns did not ingest as mangled text. Undo and export help when you are cleaning rows interactively.