pandas count difference between two dataframes code example
Example 1: python pandas difference between two data frames
diff_df = pd.merge(df1, df2, how='outer', indicator='Exist')
diff_df = diff_df.loc[diff_df['Exist'] != 'both']
Example 2: findout not common values between two data frames
df = df1.merge(df2, how = 'outer' ,indicator=True).loc[lambda x : x['_merge']=='left_only']
df