swcarpentry / python-novice-gapminder

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

Introduction to APIs with Pandas #454

Open csbell-vu opened 4 years ago

csbell-vu commented 4 years ago

Episode 08 contains an exploration section called "Using the dir function to see available methods", which is extremely useful.

I propose to amend this section by demonstrating the dir command using Pandas dataframes, and simply state that dir may be used for common Python objects as well. Then, use this as a segue into lightly introducing the Pandas API. Lessons 07 and 08 present several very helpful methods, but I think it would be a tremendous asset to show learners where they can go about finding more methods - with descriptions. A link may be provided specifically to the DataFrame API reference page (e.g., here), and an exploration can be done using the exact same assessment for the dir command: "Find the function that prints out the median per-capita GDP..."

In this way, the lesson will not be lengthened by much, and a very high impact concept/resource can be introduced, which the learners should be encouraged to explore further.

vahtras commented 4 years ago

Well it is after all a section on dataframes, so it makes sense to me.