I have a large dataframe similar to this one:
In [1]: grades
Out[1]:
course1 course2
school class student
school1 class1 student1 2 2
student2 3 2
student3 1 3
student4 3 1
student5 3 1
... ... ...
class3 student86 3 1
student87 2 2
student88 1 1
student89 3 3
student90 0 1
[90 rows x 2 columns]
Run Code Online (Sandbox Code Playgroud)
I want to compute the Mann-Whitney rank test on the grades from the sample school and each sub-sample class. How can …