Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- EXCLUDE = pd.DataFrame({'email':['a@g.com','d@g.com']})
- USERS = pd.DataFrame({'email':['a@g.com','b@g.com','b@g.com','c@g.com','d@g.com']})
- df_result = pd.merge(USERS, EXCLUDE, how='outer', indicator=True)
- df_result[df_result._merge == 'left_only'].drop(labels=['_merge'], axis=1)
Add Comment
Please, Sign In to add comment