I would like to compare the two daraframes based on key(branch) and also planning to remove the records based on key which are not matching from the both datasets.
Asked
Active
Viewed 40 times
-1
-
Where is your code? What did you try so far? Your question seems to be about returning the intersection of two Dataframes. If so, then at least give a starting point from your side. The way your question is formatted at the moment one could not even directly import `df1` and `df2` into some notebook / ipython to quickly help. – daniel451 Feb 03 '20 at 02:58
-
Does this answer your question? [Pandas Merging 101](https://stackoverflow.com/questions/53645882/pandas-merging-101) – daniel451 Feb 03 '20 at 03:01
-
@daniel451 i am able get the record which are not matching from the both dataframes using below command diff_df = df1.merge(df2, on=['branch'], how='outer') , can you please tell me how i can delete the record which are not matching from both dataframes separately. – Prasad Feb 03 '20 at 17:39