NORTHMELD PRACTICAL GUIDES
Clean CSV whitespace and duplicates without merging namesakes
Choose what makes a record a duplicate before deleting rows. This example trims surrounding whitespace, lowercases email addresses and removes duplicate full rows. Five input records become four, while two people named Alex remain separate because their other fields differ.
Prepare and download
Download csv-input.csv and keep an unchanged copy. The five fictional records include one repeated Ada row and two different Alex rows. Import the CSV in the workspace; the three headers should be Name, Email and Country.
Reproduce the result
Check the input
Confirm that the preview has five data rows and three columns. Ada has spaces around the name and an uppercase email. The Alex records have different email addresses and countries.
Choose the cleanup operations
Select Trim whitespace, Lowercase email addresses and Remove duplicate rows. Review the plan before applying it. This example compares the full cleaned row, not the Name column alone.
Review changed and removed rows
Apply the plan. Confirm that Ada becomes Ada / ada@example.com / US and only one repeated Ada record is removed. Both Alex records must remain.
Export four records
Export CSV or XLSX. Reopen it and compare against the output table below. If the row count or surviving records differ, review the plan and source before replacing any working dataset.
Actual sample results
- Input data rows
- 5
- Output data rows
- 4
- Duplicates removed
- 1
- Five input rows become four output rows; one full-row duplicate is removed.
- Surrounding name whitespace and email letter case are normalized before comparing duplicates.
- The two Alex rows survive because they are not identical full records. Matching a name alone is not enough to establish identity.
| Name | Country | |
|---|---|---|
" Ada " | "ADA@EXAMPLE.COM" | "US" |
"Lin" | "lin@example.com" | "SG" |
" Ada " | "ADA@EXAMPLE.COM" | "US" |
"Alex" | "alex@example.com" | "US" |
"Alex" | "alex.other@example.com" | "CA" |
| Name | Country | |
|---|---|---|
"Ada" | "ada@example.com" | "US" |
"Lin" | "lin@example.com" | "SG" |
"Alex" | "alex@example.com" | "US" |
"Alex" | "alex.other@example.com" | "CA" |
Limits and human review
- Repeated transactions may be legitimate even when every displayed field matches. Use a transaction identifier or source context before deleting records.
- Email lowercasing is an explicit normalization choice. If your downstream system treats address case as meaningful, omit that operation.
- This sample does not merge customers, validate mailbox ownership or decide which conflicting customer record is authoritative.