Answers for "pandas dataframe index name"

0

rename dataframe index column pandas

df.index.names = ['new_name']
Posted by: Guest on August-21-2020
0

dataframe get index name

In [7]: df.index.name
Out[7]: 'Index Title'

In [8]: df.index.name = 'foo'

In [9]: df.index.name
Out[9]: 'foo'

In [10]: df
Out[10]: 
         Column 1
foo              
Apples          1
Oranges         2
Puppies         3
Ducks           4
Posted by: Guest on October-07-2020

Code answers related to "pandas dataframe index name"

Python Answers by Framework

Browse Popular Code Answers by Language