用法:
Series.set_index(index)
返回具有不同索引的新係列。
- index:索引,Series-convertible
新索引或新索引的值
- Series
具有指定索引的新係列。
參數:
返回:
例子:
>>> import cudf >>> series = cudf.Series([10, 11, 12, 13, 14]) >>> series 0 10 1 11 2 12 3 13 4 14 dtype: int64 >>> series.set_index(['a', 'b', 'c', 'd', 'e']) a 10 b 11 c 12 d 13 e 14 dtype: int64
相關用法
- Python cudf.Series.searchsorted用法及代碼示例
- Python cudf.Series.sort_values用法及代碼示例
- Python cudf.Series.std用法及代碼示例
- Python cudf.Series.sort_index用法及代碼示例
- 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.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.set_index。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。