pd dataframe with column names code example
Example 1: pd dataframe get column names
lst = data.columns.values # data is dataframe
Example 2: give column names to a dataframe
>gapminder.columns = ['country','year','population',
'continent','life_exp','gdp_per_cap']
Example 3: dataframe names pandas
print(df.rename(columns={'A': 'a', 'C': 'c'}))