You are viewing documentation about an older version (1.21.0). View latest version

modin.pandas.Index.rename¶

Index.rename() → None[source]¶

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.

Parameters:
  • name (label or list of labels) – Name(s) to set.

  • inplace (bool, default False) – Modifies the object directly, instead of creating a new Index or MultiIndex.

Returns:

The same type as the caller or None if inplace=True.

Return type:

Index or None

See also

Index.set_names

Able to set new names partially and by level.