pandas how to rename the index code example
Example 1: pandas rename index values
df.rename(index={'alpha': 'mu'})
Example 2: rename dataframe index column pandas
df.index.names = ['new_name']
df.rename(index={'alpha': 'mu'})
df.index.names = ['new_name']