-1

I've 2 dataframes, df1 and df2, with an emails column (and other non important ones.)

I want to drop rows in df2 that contain emails that are already in df1.

How can I do that?

pault
  • 37,170
  • 13
  • 92
  • 132
remc
  • 131
  • 1
  • 9

1 Answers1

0

You can do something like this:

df_1[~df_1['email_column'].isin(df_2['email_column'].tolist())
Amir Imani
  • 2,506
  • 1
  • 19
  • 23