I have a dataframe called 'data' that keeps getting appended to over time and then the AVG/STD gets recalculated and added on after (in the future it may be MONDAY, TUESDAY WEDNESDAY, THURSDAY, AVERAGE,STD_DEV).
ID MONDAY TUESDAY AVERAGE STD_DEV
a 1 2 ... ...
b 1 2 ... ...
c 1 2 ... ...
I want to have columns dedicated to the sum of its counterpart for each column all the way through.
ID MONDAY TUESDAY AVERAGE STD_DEV MONDAY_SUM TUESDAY_SUM
a 1 2 ... ... 3 6
b 1 2 ... ...
c 1 2 ... ...
I already drop everything from AVERAGE column and on when first reading in the data so I can add on extra days then recalculate AVG,STD. How would I write code to get a sum column appended for each column between ID and AVERAGE for a growing/shrinking dataframe?