pandas foundations
Why pandas exists, Series with their index and alignment, and DataFrames with their shape, types and summaries.
About 5 hours of study
Learning objectives
- Explain what pandas adds to NumPy
- Use a Series and its index
- Inspect a DataFrame
Lessons
- 1
Why pandas, and how this course runs it Intermediate
What pandas is for, its two structures (Series and DataFrame), how a DataFrame stores a table as labelled columns, and why the exercises here model pandas in plain Python.
- 2
Series: one labelled column Intermediate
Creating a Series, its values and index, selecting by label and by position, vectorised arithmetic, and alignment: why adding two Series lines values up by label and gives NaN where a label is missing.
- 3
DataFrames: tables of labelled columns Intermediate
Creating a DataFrame, its shape, columns, index and dtypes, looking at the first rows, selecting one or several columns, and summarising the numeric columns with describe.
Module practice
- pandas: Summarise a columnEasy
- pandas: Store rows as columnsMedium
- pandas: Work out each column's typeHard
- pandas: Select from a Series by label and positionEasy
- pandas: Add two Series with alignmentMedium
- pandas: A rolling mean with missing valuesHard
- pandas: Shape, columns and headEasy
- pandas: Describe the numeric columnsMedium
- pandas: A model of DataFrame.info()Hard