Pivot Tables and crosstab

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'.

By

Updated

Cheat sheet: Pivot Tables and crosstab
Category
Data Analysis
Level
Journeyman
Tags
crosstab(), Pivot Table, python