0

I have a dataframe one

query
----------
A
B
C
D
E

dataframe two

query
---------
A
B
C

I want the output as

query
------------
D
E

as I want the values in one that are not in two

I have tried to convert it into lists and subtracting the values but that does not work.

1 Answers1

1

Try:

df1[~df1['query'].isin(df2['query'])]
Scott Boston
  • 147,308
  • 15
  • 139
  • 187