Open
Description
In [2]: import pandas as pd
In [3]: df = pd.DataFrame({'a': [1, 1, 1, 2, 2], 'b': [1,2 ,3, 4, 5]})
In [4]: df.groupby('a').rank(method='min')
Out[4]:
b
0 1.0
1 2.0
2 3.0
3 1.0
4 2.0
In [5]: df.rank()
Out[5]:
a b
0 2.0 1.0
1 2.0 2.0
2 2.0 3.0
3 4.5 4.0
4 4.5 5.0
In these cases, it would be more natural to return int64 instead of float64