# Pivot Tables

Pivot Tables: Pivot Tables and crosstab.

Updated: November 19, 2026

1. [Pivot Tables and crosstab](https://www.ask-codey.com/lessons/pandas-pivot-table) (Journeyman): pivot_table turns a summary of two columns into a grid, one value down the side (index) and one across the top (columns), with the cells worked out from values by aggfunc; fill_value puts 0 in an empty cell, margins adds the totals, and crosstab counts every combination of two columns, as row percentages with normalize='index'.

Source: https://www.ask-codey.com/courses/python-data-analysis/topics/data-pivot-tables
