Rename only one or a few pandas dataframe columns:
df.rename(columns={"A": "a", "B": "c"}, inplace=True)
Rename one or a few index:
df.rename(index={"A": "a", "B": "c"}, inplace=True)
Source:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.rename.html