how to use join in python on dataframes code example Example: merge two dataframes based on column df_outer = pd.merge(df1, df2, on='id', how='outer') df_outer