Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- id email created_at
- 0 1 son@mail_a.com 2017-01-21 18:19:00
- 1 2 boy@mail_b.com 2017-01-22 01:19:00
- 2 3 girl@mail_c.com 2017-01-22 01:19:00
- mail_a.com
- mail_d.com
- mail_e.com
- email_domains = open('file.txt', 'r')
- to_drop = email_domains.read().splitlines()
- dropped_df = test_df[~test_df['email'].isin(to_drop)]
- print(test_df)
- id email created_at
- 0 2 boy@mail_b.com 2017-01-22 01:19:00
- 1 3 girl@mail_c.com 2017-01-22 01:19:00
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement