Anti-Join Pandas

indicator = True in merge command will tell you which join was applied by creating new column _merge with three possible values: left_only right_only both Keep right_only and left_only. That is it. outer_join = TableA.merge(TableB, how = ‘outer’, indicator = True) anti_join = outer_join[~(outer_join._merge == ‘both’)].drop(‘_merge’, axis = 1) easy! Here is a comparison with … Read more