All pandas problems
HardGroup + Aggregate
Share of total (percentage)
For each city, compute what percentage of total company revenue it drives. Print as "City XX.X%".
- #share
- #transform
Sample input
same sales CSV
Sample output
Hyderabad 37.8%, Mumbai 34.1%, Bengaluru 23.8%, Pune 4.2%
pd-share-of-total.pyneeds: pandas
Output
Press "Run code" to execute.
