left_on right_on pandas code example Example: pandas merge sort columns result = df1.merge(df2, how='outer').sort_index(axis=1)