Last active
August 14, 2016 17:13
-
-
Save brandomr/987cbd26401219d4b9cab69620a5cefb to your computer and use it in GitHub Desktop.
A email to name matching script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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