In [4]: import pandas as pd
In [5]: df = pd.DataFrame(columns=['A','B','C','D','E','F','G'])
In [6]: df
Out[6]:
Empty DataFrame
Columns: [A, B, C, D, E, F, G]
Index: []
print(data.columns.values)
# adding column name to the respective columns
df.columns =['Name', 'Code', 'Age', 'Weight']
# displaying the DataFrame
print(df)
df.columns = ['column1', 'column2', 'column3']
df.columns
>gapminder.columns = ['country','year','population',
'continent','life_exp','gdp_per_cap']
print(df.rename(columns={'A': 'a', 'C': 'c'}))