rename column pandas index 0 code example Example: rename dataframe index column pandas df.index.names = ['new_name']