pandas · Lesson 7.1 · Pro

pivot_table

Turn long data into a summary grid, with one row per group and one column per category.

In this lesson

  1. One row per group, one column per category
  2. Fill the empty cells
  3. Totals with margins
  4. pivot: reshape without adding up