pandas exercises with solutions

45 practice problems from the 15 lessons of the pandas course, in lesson order and from easy to hard inside each lesson. Open a problem, write your code and press Submit: the tests run in your browser and nothing is sent to a server.

15 easy problems 15 medium problems 15 hard problems

Why pandas, and how this course runs it

3 problems · Read the lesson

Series: one labelled column

3 problems · Read the lesson

DataFrames: tables of labelled columns

3 problems · Read the lesson

Selecting rows and columns: loc, iloc and masks

3 problems · Read the lesson

Missing data: finding, dropping and filling

3 problems · Read the lesson

Transforming columns

3 problems · Read the lesson

Sorting, ranking and counting

3 problems · Read the lesson

groupby: split, apply, combine

3 problems · Read the lesson

Reshaping: pivot_table, melt and crosstab

3 problems · Read the lesson

Merging and joining DataFrames

3 problems · Read the lesson

Working with text columns

3 problems · Read the lesson

Dates and times in pandas

3 problems · Read the lesson

Reading and writing files

3 problems · Read the lesson

Method chaining, apply and performance

3 problems · Read the lesson

A complete analysis with pandas

3 problems · Read the lesson