Data Wrangling in Pandas

Data Wrangling in Pandas#

This chapter provides an introduction to reshaping and processing data in Python using Pandas. It reviews foundational syntax for interacting with a DataFrame and introduces time series data along with data aggregation and calculation workflows.

It then moves to data reshaping in Pandas, including operations like .groupby, .pivot, .melt, .pivot_table, .explode, and .transpose. It introduces merging and joining operations in Pandas and includes some discussion of multi-level indexing and regular expressions.

Acknowledgements#

The author consulted the following resources when building this chapter:

All figures shown in this lab are from the pandas “Getting Started” tutorials.

Chapter Contents#

Data#

We’ll work with a few different datasets in this chapter.

Application#

Click here for a Jupyter Notebook template for this chapter’s application problems.