Answers for "name columns by index in pandas"

3

python: change column name

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

rename dataframe index column pandas

df.index.names = ['new_name']
Posted by: Guest on August-21-2020

Code answers related to "name columns by index in pandas"

Python Answers by Framework

Browse Popular Code Answers by Language