Skip to content

Instantly share code, notes, and snippets.

@cpard cpard/
Last active May 28, 2016

What would you like to do?
Function to find if a recipient is mailing us from a business email or not
domains = ['gmail', 'yahoo', 'outlook']
def isBusiness(st):
domain = st.split("@")[1]
res = True
for s in domains:
if s in domain:
res = False
return res
joinedEventsFrame = joinedEventsFrame.merge(joinedEventsFrame['email'].apply(isBusiness).to_frame(name='isBusiness'), left_index=True, right_index=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.