I want to find the difference between two dataframes (elements in df1, not in df2) based on a subset of columns. The two data frames have the same schema.
Say df1 contains
col1 col2 col3 col4
A B C D
A C D D
and df2 contains
col1 col2 col3 col4
A D D D
A B D D
and I wanted the items in df1, where there isn't an item in df2 where col1 and col2 match. So in this case the expected output would be just the 2nd row of df1.
A C D D
I've tried different variations of isin, but I'm struggling to find anything that works. I tried https://stackoverflow.com/a/16704977/1639228 , but that only works for single columns.
df1