how to change column names python code example
Example 1: python: change column name
df = df.rename(columns = {'myvar':'myvar_new'})
Example 2: dataframe change column names
#Pandas for Python
df.coloumns = ['A','B']
df = df.rename(columns = {'myvar':'myvar_new'})
#Pandas for Python
df.coloumns = ['A','B']