似乎您需要结合使用它们。
s1.merge(s2, left_index=True, right_on=['third', 'fourth'])#s1.merge(s2, right_index=True, left_on=['first', 'second'])
输出:
s1 s2bar one 0.765385 -0.365508 two 1.462860 0.751862baz one 0.304163 0.761663 two -0.816658 -1.810634foo one 1.891434 1.450081 two 0.571294 1.116862qux one 1.056516 -0.052927 two -0.574916 -1.197596



