Answers for "update column name dataframe"

10

df change column names

df.rename(columns={"A": "a", "B": "b", "C": "c"},
errors="raise", inplace=True)
Posted by: Guest on March-12-2020
0

rename dataframe index column pandas

df.index.names = ['new_name']
Posted by: Guest on August-21-2020

Python Answers by Framework

Browse Popular Code Answers by Language