, 1], [0, 1, 0, 1]])
报错
---------------------------------------------------------------------------
TypeError...pd.MultiIndex(levels=[["a", "b"], [1, 2]],
----> 2 labels=[[0, 0, 1, 1], [0, 1, 0, 1]])
TypeError...: __new__() got an unexpected keyword argument 'labels'
原因:
查看帮助文档
pd.MultiIndex?...('a', 2),
('b', 1),
('b', 2)],
)
总结:
出现unexpected keyword argument