PythonDataScienceHandbook
PythonDataScienceHandbook copied to clipboard
Error in 03.05 In[17]
It throws:
TypeError Traceback (most recent call last)
/var/folders/sk/whcdz5rn07z0zxql__kcmkc80000gn/T/ipykernel_94723/2471881765.py in <module>
----> 1 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'
I had the same, I think you can replace "labels" with "codes" and then it works
您好,我已收到您发的邮件,我尽快回复。