bigframes.pandas.DatetimeIndex.rename#
- DatetimeIndex.rename(name: Hashable | Sequence[Hashable], *, inplace: bool = False) Index | 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.