I have a DataFrame ave_data
that contains the following:
ave_data
Time F7 F8 F9
00:00:00 43.005593 -56.509746 25.271271
01:00:00 55.114918 -59.173852 31.849262
02:00:00 63.990762 -64.699492 52.426017
I want to add another column to this dataframe, containing the average of the values under column F7, F8 and F9 for each row.
The ave_data
DataFrame might change size as my code reads from different Excel files later, so the method needs to be generic (i.e add the column containing the average always as the last column in the DataFrame, not in column number 4)
desired output
Time F7 F8 F9 Average
00:00:00 43.005593 -56.509746 25.271271 4.25
01:00:00 55.114918 -59.173852 31.849262 9.26
02:00:00 63.990762 -64.699492 52.426017 17.24