jakevdp / PythonDataScienceHandbook

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

inconsistencies between tables and commands in 3.8 line [18] #382

Open maxvolpi opened 1 year ago

maxvolpi commented 1 year ago

there are some inconsistencies in 3.8 on line [18].

I think the final .unstack() method should be removed from line [18] to produce the correct table.

the line I am talking about has this code:

[18] planets.groupby("method")["year"].describe().unstack()

The second edition is consistent between the command and the table produced, but I think what the author wanted was the table obtained in the first edition (page 164 of the printed ed), which is generated without using .unstack().