pandas merge columns with different names code example
Example 1: pandas left join
df.merge(df2, left_on = "doc_id", right_on = "doc_num", how = "left")
Example 2: python: left join
new_df = df_1.merge(df_2, on='id', how='left', indicator=True)
df.merge(df2, left_on = "doc_id", right_on = "doc_num", how = "left")
new_df = df_1.merge(df_2, on='id', how='left', indicator=True)