pandas.Index.name#

property Index.name[source]#

Return Index or MultiIndex name.

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.

Examples

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