LUNA SPACE Works
Practical guide

How to clean CSV files safely

A practical checklist for headers, duplicates and blank values.

What matters

Start by preserving the original. Normalize headers, trim outer whitespace, identify empty cells, then remove only exact duplicate rows. Review identifiers with leading zeroes before opening them in spreadsheet software.

A safe workflow

  1. Keep the source unchanged.
  2. Test on a representative copy.
  3. Review the output for meaning, not only file size or a green status.
  4. Record the settings that worked.

Common mistake

Automation can make a wrong assumption repeat faster. Confirm encoding, units, schema meaning or visual quality before applying a result broadly.

A repeatable cleanup sequence

  1. Duplicate the source file and work on the copy.
  2. Confirm the delimiter and text encoding before interpreting columns.
  3. Trim outer whitespace and normalize only headers that are actually inconsistent.
  4. Review empty cells by column; an empty optional note is different from a missing identifier.
  5. Remove exact duplicates only after confirming which columns define a record.
  6. Export, reopen and compare row counts with the source.

Example

If a three-row file contains Alice twice with exactly the same email, exact-duplicate removal can safely produce two rows. If the emails differ, keep both until a person with domain context decides whether they represent the same record.

Quality check

Record the original row count, removed-row count and final row count. Confirm that their arithmetic matches. Spot-check non-English names, leading zeros and date-like values after reopening the download.