Answers for "change column names pandas dataframes"

3

python: change column name

df = df.rename(columns = {'myvar':'myvar_new'})
Posted by: Guest on July-16-2020
0

give column names to a dataframe

>gapminder.columns = ['country','year','population',
                     'continent','life_exp','gdp_per_cap']
Posted by: Guest on June-08-2020

Code answers related to "change column names pandas dataframes"

Python Answers by Framework

Browse Popular Code Answers by Language