...

/

The Pivot Table Function

The Pivot Table Function

Learn how to create pivot tables with Pandas.

What is a pivot table?

A pivot table is a summary table obtained by grouping and aggregating values of a more extensive table. Suppose we have an orders table that contains the day, order amount, and customer code for each order. A pivot table can be created to show the daily total order amounts. We need to group the rows by day and then aggregate by taking the sum.

Creating pivot tables with Pandas

A pivot ...