I have two separate pandas dataframes (df1 and df2) which have multiple columns, but only one in common (\'text\').
df1
df2
I would like to do fin
You can merge them and keep only the lines that have a NaN.
df2[pd.merge(df1, df2, how='outer').isnull().any(axis=1)]
or you can use isin:
isin
df2[~df2.text.isin(df1.text)]