swcarpentry / python-novice-gapminder

Plotting and Programming in Python
http://swcarpentry.github.io/python-novice-gapminder/
Other
162 stars 428 forks source link

fix: clarify pandas usage with non-numeric columns #674

Closed alee closed 4 months ago

alee commented 4 months ago

pandas now raises errors when computing the mean on a dataframe with non-numeric columns

add a note to the challenge describing the issue and provide a few additional ways of solving it

Thanks to @davidwilby for finding this bug and outlining possible solutions to it in #670

github-actions[bot] commented 4 months ago

Thank you!

Thank you for your pull request :smiley:

:robot: This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

Rendered Changes

:mag: Inspect the changes: https://github.com/swcarpentry/python-novice-gapminder/compare/md-outputs..md-outputs-PR-674

The following changes were observed in the rendered markdown documents:

 14-looping-data-sets.md | 20 ++++++++++++++++----
 md5sum.txt              |  2 +-
 2 files changed, 17 insertions(+), 5 deletions(-)
What does this mean? If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible. This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

:stopwatch: Updated at 2024-03-05 00:49:55 +0000

alee commented 4 months ago

This was also addressed and fixed by @wgriffa in #666 - apologies for missing that and not crediting you with the fix as well!