I was try to get a average columns for all the std columns
I want to add one more column to calculate the average value from Std_4-Std_10 values. Not sure should I use groupby or pivot. Thanks
I was try to get a average columns for all the std columns
I want to add one more column to calculate the average value from Std_4-Std_10 values. Not sure should I use groupby or pivot. Thanks
Use:
df.filter(like='Std').mean(1)
To add it back into your dataframe, use:
df['mean_Std'] = df.filter(like='Std').mean(1)