Data quality

How to clean a CSV file without changing its meaning

The spreadsheet looks fine. Then someone sorts the customer codes and notices that 00127 has become 127. Nothing crashed, and the file still opens. That is what makes some CSV problems so easy to miss: the damage looks perfectly ordinary.

Before you fix a value, look at how it arrived

A CSV file carries values, but it does not reliably tell your spreadsheet which columns are identifiers, dates, or numbers. When importing it, explicitly treat customer codes, postal codes, and similar references as text. Once a leading zero has disappeared, padding the column with zeros only works if you know the required length. Otherwise, return to the original export.

Keep an untouched copy of that export. This sounds obvious until you are halfway through a cleanup and cannot remember whether an empty cell was empty when you started.

If every row lands in one column, check the delimiter before changing anything else. The file may use semicolons or tabs. If accented names look broken, investigate the encoding. Neither problem is fixed by replacing characters at random.

The values that deserve a second look

A useful preview includes a little deliberate awkwardness: the longest name, a blank identifier, a value with an accent, and a number with a comma in it. Looking only at the first few tidy rows can hide the exact problem you are trying to catch.

Take 1,250. Depending on the source, it could mean one thousand two hundred and fifty or one and a quarter. The same problem appears with 03/04/2026. Ask for the source format rather than guessing from whichever interpretation looks plausible.

For category labels, inspect the distinct values and their counts before standardizing them. “Pending” and “Pending ” may be the same category with an accidental space. “Pending review” may carry useful information. A small list makes these differences easier to spot than thousands of repeated rows.

After cleaning, compare row counts, a few totals where they make sense, and the awkward examples you picked earlier. Matching totals will not prove everything is correct, but a surprise gives you somewhere concrete to investigate.

How Fnd8n helps

Fnd8n lets you confirm CSV input settings, apply cleaning steps to selected columns, and preview the result. Separate cleaned outputs and available change records help you compare the result with the source.