My input dataframe looks something like this.
EXP 1 EXP 2 EXP 3 EXP 4
1 2 4 3
5 6 4 3
5 2 1 2
3 3 2 3
I want to create three new columns. The first new column is the sum of EXP 1 and EXP 2 The second new column is the sum of EXP 1 and EXP 2 and EXP 3 The third new column is the sum of EXP 1 and EXP 2 and EXP 3 and EXP 4
I've tried making a loop for this but I'm not really sure how to go about it.
Obviously I could just go df['NEW COLUMN 1'] = df['EXP 1'] + df['EXP 2'] etc but this is too slow for my real objective.
Any help is appreciated.