@@ -598,27 +598,27 @@ def mode(values):
598
598
def rank (values , axis = 0 , method = 'average' , na_option = 'keep' ,
599
599
ascending = True , pct = False ):
600
600
"""
601
- Rank the values along a given axis.
602
-
603
- Parameters
604
- ----------
605
- values : array-like
606
- Array whose values will be ranked. The number of dimensions in this
607
- array must not exceed 2.
608
- axis : int, default 0
609
- Axis over which to perform rankings.
610
- method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
611
- The method by which tiebreaks are broken during the ranking.
612
- na_option : {'keep', 'top'}, default 'keep'
613
- The method by which NaNs are placed in the ranking.
614
- - ``keep``: rank each NaN value with a NaN ranking
615
- - ``top``: replace each NaN with either +/- inf so that they
616
- there are ranked at the top
617
- ascending : boolean, default True
618
- Whether or not the elements should be ranked in ascending order.
619
- pct : boolean, default False
620
- Whether or not to the display the returned rankings in integer form
621
- (e.g. 1, 2, 3) or in percentile form (e.g. 0.333..., 0.666..., 1).
601
+ Rank the values along a given axis.
602
+
603
+ Parameters
604
+ ----------
605
+ values : array-like
606
+ Array whose values will be ranked. The number of dimensions in this
607
+ array must not exceed 2.
608
+ axis : int, default 0
609
+ Axis over which to perform rankings.
610
+ method : {'average', 'min', 'max', 'first', 'dense'}, default 'average'
611
+ The method by which tiebreaks are broken during the ranking.
612
+ na_option : {'keep', 'top'}, default 'keep'
613
+ The method by which NaNs are placed in the ranking.
614
+ - ``keep``: rank each NaN value with a NaN ranking
615
+ - ``top``: replace each NaN with either +/- inf so that they
616
+ there are ranked at the top
617
+ ascending : boolean, default True
618
+ Whether or not the elements should be ranked in ascending order.
619
+ pct : boolean, default False
620
+ Whether or not to the display the returned rankings in integer form
621
+ (e.g. 1, 2, 3) or in percentile form (e.g. 0.333..., 0.666..., 1).
622
622
"""
623
623
if is_categorical (values ):
624
624
ranks = values ._rank (axis = axis , method = method , ascending = ascending ,
0 commit comments