pd create dataframe with column names code example
Example 1: initialize pandas dataframe with column names
column_names = ["a", "b", "c"]
df = pd.DataFrame(columns = column_names)
Example 2: give column names to a dataframe
>gapminder.columns = ['country','year','population',
'continent','life_exp','gdp_per_cap']