python:Multi-index 的两个DataFrame如何合并

in

df3=pd.concat([df1,df2],axis=1,join='inner')

out

Exception: cannot handle a non-unique multi-index!

报错显示:不能操作非单一的多级索引

其中df1
图片说明

in:

df1.index

out:

MultiIndex(levels=[['2016-01-29','2016-02-29'........], ['000006.SZ','000008.SZ'........]

df1为 时间加股票 的两级index。

df2和df1除了多了列,其他一致。

合并希望呈现相同的两级index,添加各自的列。
向大神请教,如何解决多级索引合并的问题,感谢。

pd.merge(df1,df2, left_index=True, right_index=True, how='inner')