I have a dataframe that looks after using the pandas group function:
group. letters. counts. sum_1. sum_2
1. a. 20 3. 2
1. b. 40. 2. 3
2. a. 60. 3. 5
2. b. 90. 5. 4
and I want to automate it without having to do it in Excel to make something like this: excel
group. letters. counts. sum_1. sum_1_%. sum_2. sum_2rate
1. a. 20 3. 5% 2 3.33%
1. b. 40. 2. 3.33% 3 5%
total. 60 5 5
2. a. 60. 3. 5
2. b. 90. 5. 4