Skip to content

Instantly share code, notes, and snippets.

@rockyfjord
rockyfjord / barnum
Created July 7, 2016 19:17
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')