I wish to sum values in the row that contains 'BB' and place that value in first column of that row.
Data
ID Q121 Q221 Q321 Q421
AA 8.0 4.8 3.1 5.3
BB 0.6 0.7 0.3 0.9
Desired
ID Q121 Q221 Q321 Q421
AA 8.0 4.8 3.1 5.3
BB 2.5 0.0 0.0 0.0
Doing
df.loc[df['ID'] == BB, 'Q121','Q221','Q321','Q421'].sum()
Not sure how to then place this value in the first column
I am still researching, any suggestion is appreciated.