pandas index columns by name and change name code example Example: rename dataframe index column pandas df.index.names = ['new_name']