dataframe change column name by index code example
Example 1: python: change column name
df = df.rename(columns = {'myvar':'myvar_new'})
Example 2: dataframe names pandas
print(df.rename(columns={'A': 'a', 'C': 'c'}))
df = df.rename(columns = {'myvar':'myvar_new'})
print(df.rename(columns={'A': 'a', 'C': 'c'}))