Skip to content

Commit 3f1dd61

Browse files
committed
DOC: Correct documentation to GroupBy.rank
Closes pandas-devgh-20694.
1 parent 7f7f3d4 commit 3f1dd61

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

pandas/core/groupby/groupby.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -1841,24 +1841,27 @@ def cumcount(self, ascending=True):
18411841
@Appender(_doc_template)
18421842
def rank(self, method='average', ascending=True, na_option='keep',
18431843
pct=False, axis=0):
1844-
"""Provides the rank of values within each group
1844+
"""
1845+
Provides the rank of values within each group.
18451846
18461847
Parameters
18471848
----------
1848-
method : {'average', 'min', 'max', 'first', 'dense'}, efault 'average'
1849+
method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
18491850
* average: average rank of group
18501851
* min: lowest rank in group
18511852
* max: highest rank in group
18521853
* first: ranks assigned in order they appear in the array
18531854
* dense: like 'min', but rank always increases by 1 between groups
1854-
method : {'keep', 'top', 'bottom'}, default 'keep'
1855+
ascending : boolean, default True
1856+
False for ranks by high (1) to low (N)
1857+
na_option : {'keep', 'top', 'bottom'}, default 'keep'
18551858
* keep: leave NA values where they are
18561859
* top: smallest rank if ascending
18571860
* bottom: smallest rank if descending
1858-
ascending : boolean, default True
1859-
False for ranks by high (1) to low (N)
18601861
pct : boolean, default False
18611862
Compute percentage rank of data within each group
1863+
axis : int, default 0
1864+
The axis of the object over which to compute the rank.
18621865
18631866
Returns
18641867
-----

0 commit comments

Comments
 (0)