Series.rank(axis=0, method='average', numeric_only=None, na_option='keep', ascending=True, pct=False)
[source]
Compute numerical data ranks (1 through n) along axis. Equal values are assigned a rank that is the average of the ranks of those values
Parameters: |
axis: {0 or ‘index’, 1 or ‘columns’}, default 0 index to direct ranking method : {‘average’, ‘min’, ‘max’, ‘first’, ‘dense’}
numeric_only : boolean, default None Include only float, int, boolean data. Valid only for DataFrame or Panel objects na_option : {‘keep’, ‘top’, ‘bottom’}
ascending : boolean, default True False for ranks by high (1) to low (N) pct : boolean, default False Computes percentage rank of data |
---|---|
Returns: |
ranks : same type as caller |
© 2011–2012 Lambda Foundry, Inc. and PyData Development Team
© 2008–2011 AQR Capital Management, LLC
© 2008–2014 the pandas development team
Licensed under the 3-clause BSD License.
http://pandas.pydata.org/pandas-docs/version/0.19.2/generated/pandas.Series.rank.html