cudf.Series.rename#

Series.rename(index=None, copy=True)#

Alter Series name

Change Series.name with a scalar value

Parameters
indexScalar, optional

Scalar to alter the Series.name attribute

copyboolean, default True

Also copy underlying data

Returns
Series

Notes

Difference from pandas:
  • Supports scalar values only for changing name attribute

  • Not supporting : inplace, level

Examples

>>> import cudf
>>> series = cudf.Series([10, 20, 30])
>>> series
0    10
1    20
2    30
dtype: int64
>>> series.name
>>> renamed_series = series.rename('numeric_series')
>>> renamed_series
0    10
1    20
2    30
Name: numeric_series, dtype: int64
>>> renamed_series.name
'numeric_series'