cudf.Index.rename#

Index.rename(name, inplace=False)#

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
Int64Index([1, 2, 3], dtype='int64', name='one')
>>> index.name
'one'
>>> renamed_index = index.rename('two')
>>> renamed_index
Int64Index([1, 2, 3], dtype='int64', name='two')
>>> renamed_index.name
'two'