Answers for "change column names of dataframe"

3

python: change column name

df = df.rename(columns = {'myvar':'myvar_new'})
Posted by: Guest on July-16-2020
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

Code answers related to "change column names of dataframe"

Python Answers by Framework

Browse Popular Code Answers by Language