Contra - A professional network for the jobs and skills of the futurePython Demo: Cleaning Duplicate and Inconsistent Customer Data
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started
614 messy rows in. 560 clean customers out.
This is a demo on a fictional customer list. Names written two ways, dates in different formats, phones without country codes, the same customer twice.
A Python script fixed it in one run and wrote a change log: 48 duplicates removed, 522 phones in one format. The 6 rows it could not fix safely went to a "Needs review" sheet. Nothing is guessed.
What's the messiest file you've ever had to clean?
Post image
Post image
Maksim's avatar
IDM logo
The review bucket is what makes this trustworthy. Three things I would add before it touches a real list. Normalise phones with libphonenumber rather than a regex, because a regex cannot infer the country and will happily emit valid looking wrong numbers. Normalise before dedupe...
Eros's avatar
Thanks, Maksim, these are great points. You're right about phones: my demo takes the country from the Country column and only knows 4 countries and one number length, so for a real list libphonenumber is the better choice. Keeping the old value in the log is a good idea too:...
Back to feed
The network for creativity
Join 1.25M professional creatives like you
Connect with clients, get discovered, and run your business 100% commission-free
Creatives on Contra have earned over $150M and we are just getting started