AI engineering glossary · NumPy pandas visualization

What is pivot table?

Pivot table (also called pivot_table): A summary table in which the distinct values of one column become the rows, another column's values become the headers, and a chosen statistic fills the cells. In pandas it is made with pivot_table and works like a spreadsheet pivot.

Level: intermediateTopic: NumPy pandas visualization

Pivot table: an example

df.pivot_table(index='city', columns='month', values='sales', aggfunc='sum') shows total sales for every city in each month.

Related terms

More NumPy pandas visualization terms

Where you learn it

Pivot table is part of the AI Engineering Program, which teaches it with notes, a hands-on lab and an exam. The first lesson is free.

Before you go

Take the cheat sheet with you

One free PDF: the key AI-engineering terms, formulas and Python idioms. No spam; unsubscribe any time.