pandas set_index rename to id code example Example: pandas rename index values df.rename(index={'alpha': 'mu'})