The following is my code and result:
import numpy as np
a = np.random.standard_normal((9, 2))
a.round(6)
df = pd.DataFrame(a)
print df
print df.rank()
df.rank().mean(axis=1)
0 1
0 0.781009 1.131006
1 -2.158037 0.515712
2 0.643429 0.377173
3 0.143428 2.006298
4 0.525322 -0.245461
5 0.389584 0.936854
6 1.523639 1.233131
7 1.952220 -1.779889
8 0.038050 -1.219017
0 1
0 7 7
1 1 5
2 6 4
3 3 9
4 5 3
5 4 6
6 8 8
7 9 1
8 2 2
Out[48]:
0 7
1 3
2 5
3 6
4 4
5 5
6 8
7 5
8 2
dtype: float64
But I do understand what the result of rank() and mean(axis=1) mean. Could someone help?
Cheers