I have some students data that I need to get average. What I've realized is that when I work it out in pandas, I get the average as according to the number of subjects done by a student, it it doesn't include those subjects that the student didn't sit for. I however, need it to work out the average using the total number of subjects in that class(including those the student didn't sit for). Is this even possible??
df["AVE"] = df[column_list].mean(axis=1).round(decimals=0)