After doing a left merge of two dataframes with Pandas, I would like to produce a data frame consisting of the second/right dataframe's rows that were not successfully merged.
The dataframes, df1 and df2, are being merged based on two columns, entitled City and State. I did this to produce the merged dataframe, df3:
merged_df = pd.merge(df1, df2, how="left", left_on=['City','State'], right_on=['City','State'])
How do I produce an unmerged_df consisting of the df2 rows that were not successfully matched and merged with df1?
Thanks for your help!