cudf.Index.rename#

Index.rename(name, inplace=False)[source]#

Alter Index name.

Defaults to returning new index.

Parameters:
namelabel

Name(s) to set.

Returns:
Index

Examples

>>> import cudf
>>> index = cudf.Index([1, 2, 3], name='one')
>>> index
Index([1, 2, 3], dtype='int64', name='one')
>>> index.name
'one'
>>> renamed_index = index.rename('two')
>>> renamed_index
Index([1, 2, 3], dtype='int64', name='two')
>>> renamed_index.name
'two'