Menu
Newbedev LogoNEWBEDEV Python Javascript Linux Cheat sheet
Newbedev LogoNEWBEDEV
  • Python 1
  • Javascript
  • Linux
  • Cheat sheet
  • Contact

how to change headers in pandas code example

Example 1: rename row pandas

>>> df.rename({1: 2, 2: 4}, axis='index')
   A  B
0  1  4
2  2  5
4  3  6

Example 2: dataframe change column names

#Pandas for Python

df.coloumns = ['A','B']

Tags:

Python Example

Related

onclick javascript in input tag code example set jquery radio button checked code example how to randomly pick out of an array in javascript code example what is primitive data type? code example how to run tkinter code example rename file in linux cli code example show contents of database mongodb code example for 1 second in python code example implement custom react code example if exists sql insert code example what is an async function javascript code example get with json js code example

Recent Posts

Pandas how to find column contains a certain value Recommended way to install multiple Python versions on Ubuntu 20.04 Build super fast web scraper with Python x100 than BeautifulSoup How to convert a SQL query result to a Pandas DataFrame in Python How to write a Pandas DataFrame to a .csv file in Python
© 2021 newbedevPrivacy Policy