Skip to content

Instantly share code, notes, and snippets.

@rockyfjord
Created July 7, 2016 19:17
Show Gist options
  • Save rockyfjord/b3f2c148e59b2286b22a0e9f76811277 to your computer and use it in GitHub Desktop.
Save rockyfjord/b3f2c148e59b2286b22a0e9f76811277 to your computer and use it in GitHub Desktop.
Generates plausible e-mails from first and last name tuple
import pandas as pd
import barnum
xl = pd.ExcelFile('garbage_emails.xlsx')
df = xl.parse("Sheet1")
for index, row in df.iterrows():
row['Email Address'] = barnum.create_email(name=(row['First Name'], row['Last Name']))
df.loc[index] = row
writer = pd.ExcelWriter('emails_for_HRIS.xlsx', engine='xlsxwriter')
df.to_excel(writer, sheet_name='Sheet1')
writer.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment