Skip to content

Instantly share code, notes, and snippets.

@brandomr
Last active August 14, 2016 17:13
Show Gist options
  • Save brandomr/987cbd26401219d4b9cab69620a5cefb to your computer and use it in GitHub Desktop.
Save brandomr/987cbd26401219d4b9cab69620a5cefb to your computer and use it in GitHub Desktop.
A email to name matching script
from fuzzywuzzy import process
names = ['Megan Sherman','Jin Zhang','Amr Ahmed','Jeffrey De Fauw','Linus Upson','Jonathan Binghman']
emails = ['[email protected]','[email protected]','[email protected]','[email protected]','[email protected]']
names_cleaned = [i.lower() for i in names]
emails_cleaned = [i.split('@')[0] for i in emails]
for email in emails_cleaned:
print '######'
print email
print process.extractOne(email,names_cleaned)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment