bigframes.pandas.Index.rename#
- Index.rename(name:Hashable|Sequence[Hashable])→Index[source]#
- Index.rename(name:Hashable|Sequence[Hashable],*,inplace:Literal[False])→Index
- Index.rename(name:Hashable|Sequence[Hashable],*,inplace:Literal[True])→None
Alter Index or MultiIndex name.
Able to set new names without level. Defaults to returning new index.Length of names must match number of levels in MultiIndex.
Examples:
>>>idx=bpd.Index(['A','C','A','B'],name='score')>>>idx.rename('grade')Index(['A', 'C', 'A', 'B'], dtype='string', name='grade')
- Parameters:
- Returns:
The same type as the caller or None if
inplace=True.- Return type:
bigframes.pandas.Index | None
- Raises:
ValueError – If
nameis not the same length as levels.
On this page