Jul-07-2020, 12:52 PM
df1 has 3 columns 'A','B','C' df2 has 3 columns 'A','B','C'
below is the option tried for find common records between two columns('A','B') in two dataframes and finding the unmatched records on column('C').
Please suggest , if there is a better way.
matched_on_AB_not_C = pd.merge(df1,df2,on=['A','B'], how='inner')
duration_diff = (matched_on_AB_not_C['C_y'].ne(matched_on_AB_not_C['C_x']))
below is the option tried for find common records between two columns('A','B') in two dataframes and finding the unmatched records on column('C').
Please suggest , if there is a better way.
matched_on_AB_not_C = pd.merge(df1,df2,on=['A','B'], how='inner')
duration_diff = (matched_on_AB_not_C['C_y'].ne(matched_on_AB_not_C['C_x']))