swcarpentry / python-novice-gapminder

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

add transpose + drop to episode 07 reading other data challenge describe #561

Open alee opened 3 years ago

alee commented 3 years ago

In the challenge https://swcarpentry.github.io/python-novice-gapminder/07-reading-tabular/index.html#reading-other-data

might be useful to cover dropping the continent column before transposing it and describing the dataset to get summary statistics for each country e.g.,

americas.drop(columns=['continent']).T.describe()

(credit to Gil Speyer for demonstrating this during a recent workshop)