Two messy exports.
One clean customer list.
The till system and the newsletter tool each hold part of the shop's customers, with capitals and stray spaces everywhere. This tool merges them, removes duplicates by email, and hands back one file ready to upload.
Till export
Newsletter export
After the merge
Merge your two exports
Drop the two CSV files below, or load the fictional sample exports. Everything runs in your browser; no file is uploaded anywhere. The shop also receives the same logic as a Python script to run locally.
Rows in
Duplicates removed
No email (skipped)
Unique customers
| Name | Last visit | Phone | Source |
|---|
| Name | Last visit | Phone | Reason |
|---|
How it works
Three steps, the same in the browser and in the script.
Read both files
The export-date line at the top of the till file is skipped. Headers are matched loosely, so "E-mail" and "email " both work.
Clean and compare
Emails are lower-cased with spaces removed, then compared. Names are trimmed and capitalised; "van" and "de" stay lower case.
Write two files
One clean list with the till columns, and a skipped file so nobody disappears without being noticed.
Rules we agreed
Written down so the result is predictable every time it runs.