Answers for "dataframe change column name by index"

3

python: change column name

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

dataframe names pandas

print(df.rename(columns={'A': 'a', 'C': 'c'}))
Posted by: Guest on November-24-2020

Code answers related to "dataframe change column name by index"

Python Answers by Framework

Browse Popular Code Answers by Language