I'm using Pandas to manipulate a csv file with several rows and columns that looks like the following:
'id'     'cpi'  
 1       0.95   
 1       0.97
 2       0.93
 3       0.98
 4       0.91
 5       0.91
 1       0.86
 2       0.74
 7       0.81
How do I add third column for the total sum for unique id? like:
'id'   'sum'
 1     2.78
 2     1.67
 3     0.98
 4     0.91
 5     0.91
 7     0.81
I'm pretty sure that it should not be super hard just not sure where should I go.
 
     
     
    
