How to Create Pivot Tables With pandas - Real Python
Briefly

Pivot tables allow common aggregate statistical calculations such as sums, counts, averages, revealing trends and insights hidden in raw data.
Pivot tables are still commonly used in spreadsheet packages, modern database applications, and programming languages, including Python with pandas' DataFrame.pivot_table() method.
Read at Realpython
[
|
]