I have these two dataframes:
df1 = pd.DataFrame({'A': ['A0', 'A1', 'A2'],'B': ['B0', 'B1', 'B2']}) df2 = pd.DataFrame({'A': ['A0', 'A1', 'A3'],'B': ['B0', 'B1', 'B2']}) I would like to merge these two dataframes now by the entries in column 'A'. But I do not want to keep the rows which match but the ones which do not match to each other.
That means, I would like to get a new dataframe which looks like this one:
df_new = pd.DataFrame({'A':['A3'], 'B':['B2']}) How could I do this?
Thanks a lot!
how='outer'in yourpd.merge()?