用法:
Series.sort_values(axis=0, ascending=True, inplace=False, kind='quicksort', na_position='last', ignore_index=False)
按任一軸上的值排序。
- ascending:bool 或 bool 列表,默認為 True
升序與降序排序。指定多個排序順序的列表。如果這是一個布爾列表,則必須匹配 by 的長度。
- na_position:{‘first’, ‘last’},默認 ‘last’
‘first’ 將空值放在開頭,‘last’ 將空值放在末尾
- ignore_index:布爾值,默認為 False
如果為 True,則不會對索引進行排序。
- Series:具有排序值的係列。
參數:
返回:
注意:
- 與 Pandas 的區別:
- 僅支持axis='index'。
- 不支持:就地,善良
例子:
>>> import cudf >>> s = cudf.Series([1, 5, 2, 4, 3]) >>> s.sort_values() 0 1 2 2 4 3 3 4 1 5 dtype: int64
相關用法
- Python cudf.Series.sort_index用法及代碼示例
- Python cudf.Series.std用法及代碼示例
- Python cudf.Series.searchsorted用法及代碼示例
- Python cudf.Series.sum_of_squares用法及代碼示例
- Python cudf.Series.scale用法及代碼示例
- Python cudf.Series.subtract用法及代碼示例
- Python cudf.Series.sum用法及代碼示例
- Python cudf.Series.sub用法及代碼示例
- Python cudf.Series.skew用法及代碼示例
- Python cudf.Series.set_index用法及代碼示例
- Python cudf.Series.sin用法及代碼示例
- Python cudf.Series.sample用法及代碼示例
- Python cudf.Series.sqrt用法及代碼示例
- Python cudf.Series.size用法及代碼示例
- Python cudf.Series.ceil用法及代碼示例
- Python cudf.Series.update用法及代碼示例
- Python cudf.Series.max用法及代碼示例
- Python cudf.Series.head用法及代碼示例
- Python cudf.Series.reindex用法及代碼示例
- Python cudf.Series.interleave_columns用法及代碼示例
注:本文由純淨天空篩選整理自rapids.ai大神的英文原創作品 cudf.Series.sort_values。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。