Pivot Tables
Pivot Tables: Pivot Tables and crosstab.
Updated
- Pivot Tables and crosstab (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'.