So I am trying to create a new row in my dataframe that adds up the sums for only column A B and C and have the means for column D and E. I have tried doing something like:
df.loc['totals'] = df['daily budget', 'weekly budget', 'monthly budget'].sum() + df['average spent monthly','average spent yearly'].mean()
It didnt work. Should I try to define each value by doing something like
sum1 = df['daily budget'].sum()
sum2 = df['weekly budget'].sum()
sum3 = ....
mean1 =df['average monthly'].mean()
mean2 = ....
And fill in the cell?