I'm a total newbie with dataframes and really struggling with some basic ideas. I want to take the mean across several columns (x, y, and z motions to get the magnitude, for instance) for each row. Some dummy data:
'time', 'x', 'y', 'z'
1, 1.3, 0.1, 2.2
2, 1.2, 0.5, 2.0
3, 1.5, 0.3, 2.0
4, 1.3, 0.0, 2.5
5, 1.1, 0.3, 2.3
I thought I was onto something with groupby() but no dice.
grouped_df = df.groupby('x', 'y', 'z').mean()
print(grouped_df.head())
only prints the original dataframe, so I'm not sure what that function's even doing.
I'm at a total loss for how to move forward, any pointers appreciated!