I have two data frames:
df1 = pd.DataFrame({ "name": ["Peter", "John", "Jack", "Mark", "Adam", "Mike", "Aaron", "Mike"], "age": [25, 34, 58, 29, 42, 39, 48, 24], }) df2 = pd.DataFrame({ "name": ["Mark", "Jack", "Adam", "Mike"], "age": [29, 58, 42, 39], "is_funny": [False, True, True, False], }) I want to remove all rows present in df2 from df1 matching in name and age. This would result in the following data frame:
>>> df3 name age 0 Peter 25 1 John 34 2 Aaron 48 3 Mike 24 df.isin() only seems to work on ordered rows and checks using index (not the case here).
Thanks in advance