pandas merge two indexes code example Example: merge on index pandas pd.merge(df1, df2, left_index=True, right_index=True)