I have grouped columns on the basis of their names and I have 3 columns in each group.I am not able to get the average of each row of each group. For Example
Group 1
row 1: 1 2 3
row 2: 4 5 6
row 3: 7 8 9
Group 2
row 1: 4 2 3
row 2: 4 8 6
row 3: 7 8 12
Output
Group 1
---------Mean
row 1 : 2
row 2 : 5
row 3 : 8
Group 2
---------Mean
row 1 : 3
row 2 : 6
row 3 : 9
When I apply c=grouped.agg('mean',axis=0) I get this error "Numpy operations are not valid with groupby. Use .groupby(...).mean() instead"
Groupby.mean(axis=0) does not work either