pandas.Index.name#

property Index.name[source]#

Return Index or MultiIndex name.

Returns:
label (hashable object)

The name of the Index.

See also

Index.set_names

Able to set new names partially and by level.

Index.rename

Able to set new names partially and by level.

Series.name

Corresponding Series property.

Examples

>>> idx = pd.Index([1, 2, 3], name="x")
>>> idx
Index([1, 2, 3], dtype='int64',  name='x')
>>> idx.name
'x'