Reputation: 1571
Having two dataframes (df1 and df2) which have multiple categorical data columns (Country, City, Postcode) and one with quantitative data, how can I see all the rows which are in df1 but not in df2?
Both dataframes are not necassarily sorted in the same way. The Index is just a serial.
Upvotes: 0
Views: 420
Reputation: 323376
You can using merge
df1.merge(df2.assign(onlydf1=1),on=['yourcategorydate'],how='left').loc[lambda x :x['onlydf1'].isnull(),:]
Upvotes: 1