# Shares and Percentages of a Total

A group's total means more beside the whole, so divide each group's total by the grand total and multiply by 100 for its share as a percentage; transform('sum') lines each group's total up with every row, so each row's share of its own group is one division; and shares are rounded to one decimal place only at the end, for people to read.

![Cheat sheet: Shares and Percentages of a Total](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/cb6b50b411f14489a57b8444ad5676e8.webp)

- Category: Data Analysis
- Level: Journeyman
- Tags: Grand Total, python, Transform
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/pandas-shares-of-a-total-cheat-sheet
