jakevdp / PythonDataScienceHandbook

Python Data Science Handbook: full text in Jupyter Notebooks
http://jakevdp.github.io/PythonDataScienceHandbook
MIT License
42.69k stars 17.82k forks source link

Update 03.05-Hierarchical-Indexing.ipynb #407

Open Revanchist317 opened 4 months ago

Revanchist317 commented 4 months ago

I think I discovered a small bug when running cell 17. The MultiIndex constructor takes "codes" not "labels" as its input when doing the internal encoding. Tested on pandas 2.2.2.

The original error was: TypeError: new() got an unexpected keyword argument 'labels'