pandas how to change columns names 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']