I have a data frame like this (as shown in the first image)
How to add the values of column 'Amount' based on the column 'Index'. For example, all the values of column 'Amount' having the common index should be added together and written in respective position in 'Sum'. It should look like this. (as shown in second image)