I have two pandas dataframes. df1 is indexed by a multi-index (name, date). df2 is a simple 0 to n index with a 'Date' column. My question is how I can merge these two dataframes by date, while keeping the multi-index.
I used following command to merge. The merged dataframe don't have the multi-index anymore.
df_merg = pd.merge(df1, df2, how='left', left_on='date', righ_on='Date')