Answers for "how to rename the index of a pandas dataframe"

1

pandas rename index values

df.rename(index={'alpha': 'mu'})
Posted by: Guest on May-04-2020
0

rename dataframe index column pandas

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

Code answers related to "how to rename the index of a pandas dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language