i need a little bit of help with this unique problem. i have the following dataframe:
volume
index
1 5
1 10
1 10
2 6
2 8
2 5
3 15
3 5
i want to create a new dataframe that adds all the values in the respective indices (for index 1, add 5+10+10= 25 , etc) as shown below: how do i go about it?
volume
index
1 25
2 19
3 20