i have follwing data.
I would like to know the average score for each item for each subject.
So I used the pivot table function in Python.
However, the average for each evaluator is calculated instead of the overall average, so this needs to be calculated again.
i used following code.
df_total_pv = pd.pivot_table(df_total, index=’Subject’, columns=’Judge’, values=[‘item1′,’item2′,’item3′], aggfunc=’mean’)
and result was..
item1 item2 item3
Judge A B C D A B C D A B C D
Subject
Jason 3.0 4.0 2.666667 2.000000 4.0 5.0 2.666667 4.0 3.0 3.0 3.333333 2.000000
Mike 3.0 5.0 5.000000 2.666667 4.0 1.0 1.000000 3.0 3.0 3.0 3.000000 2.333333
Sam 3.0 5.0 3.500000 2.000000 3.0 1.0 3.000000 4.0 3.0 3.0 3.000000 2.000000
but i want to get a total mean.
like this
how can i get the result??