Skip to content

Working with Data ​

Load a table, clean it, answer questions about it, and draw the chart. Three lessons and one project with pandas and matplotlib.

This track is for people who finished the main course and have data to work with: sales records, exam results, survey answers, measurements. In the main course you read CSV and JSON files with the standard library, where every question needs a loop. Here the same questions take one line of pandas.

Start with Reading Data Files → · Back to the main course

What you should already know ​

Lessons ​

LessonYou'll be able to
Reading Data FilesLoad CSV and JSON into a DataFrame, select and filter rows, and handle missing values
pandas BasicsSort, group, aggregate, pivot, and merge tables
Charts with matplotlibDraw line, bar, histogram, and scatter charts, and save them as images
Project: Sales Data ReportClean messy sales data and produce a report with tables and a three-panel chart

What you need ​

You do not need to install anything to follow along. The editor on this site loads pandas and matplotlib when your code imports them, which makes the first run of an example slower than usual. To work with your own files, use the Python Lab, which has a file browser and an upload button.

On your own computer, install both packages first:

text
python -m pip install pandas matplotlib