pd.DataFrame.rank¶
pandas.DataFrame.rank(axis=0, method='average', numeric_only=NoDefault.no_default, na_option='keep', ascending=True, pct=False)
支持的参数¶
+-----------------------------+------------------------------------------------------------+
| 参数 | 数据类型 |
| method | - 字符串,值为 {'average', 'min', 'max', 'first', 'dense'} |
+-----------------------------+------------------------------------------------------------+
| na_option | - 字符串,值为 {'keep', 'top', 'bottom'} |
+-----------------------------+------------------------------------------------------------+
| ascending | - 布尔值 |
+-----------------------------+------------------------------------------------------------+
| pct | - 布尔值 |
+-----------------------------+------------------------------------------------------------+
注意
- 使用
method='first'和ascending=False目前不被支持。