1df_outer = pd.merge(df1, df2, on='id', how='outer') #here id is common column
2
3df_outer
4
1new_df = pd.merge(A_df, B_df, how='left', left_on=['A_c1','c2'], right_on = ['B_c1','c2'])
1# df1 as main df and use the feild from df2 and map it into df1
2
3df1.merge(df2,on='columnName',how='left')
1>>> df1.merge(df2, left_on='lkey', right_on='rkey')
2 lkey value_x rkey value_y
30 foo 1 foo 5
41 foo 1 foo 8
52 foo 5 foo 5
63 foo 5 foo 8
74 bar 2 bar 6
85 baz 3 baz 7
9