merge 2 dataframes in pandas by inner join code example Example: pandas left join df.merge(df2, left_on = "doc_id", right_on = "doc_num", how = "left")