Does anybody have an idea how to count all boolean values(including the false one) in pivot table?
passed_exam
is a column of boolean values.
This code performs the task only for true values which is great:
table = pd.pivot_table(df,index=["student","semester"], values=["passed_exam"],aggfunc=np.sum)
But I also want a column that counts all boolean values.
Thank you in advance!