Depreciated default setting gives error with pandas>=2.0.1
catchSheep opened this issue · comments
In episodes/02-starting-with-data.md
line 519 no longer produces the expected output in pandas>=2, and instead produces a very long error as it tried to take the mean of the non-numeric columns (eg species code, gender etc)
In pandas version 1.5.3 we get a future warning indicating that it will no longer work:
This can be fixed by just passing in numeric_only=True
to grouped_data.mean()
, e.g.:
grouped_data.mean(numeric_only=True)
@catchSheep Thanks for your report! Would you like to submit a pr to fix the issue?
No worries, I just made one: #565
I ended up finding three values needing to be changed in this episode, included in that commit
Fixed by #565