How to rename columns in pandas (Python)?

0 votes

I have a DataFrame and I want to rename columns names:

Example:

["Mist","Dust","Air","Sky"]

to

["Mist1","Dust1","Air1","Sky1"]
Apr 30, 2018 in Data Analytics by DataKing99
• 8,130 points
135 views

1 answer to this question.

0 votes

It is easy by just adding ".columns" attribute:

image

answered Apr 30, 2018 by DeepCoder786
• 1,720 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
1 answer

How to join two tables (tibbles) by *list* columns in R

You can use the hash from digest ...READ MORE

answered Apr 5, 2018 in Data Analytics by kappa3010
• 2,020 points
72 views
0 votes
1 answer
0 votes
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21 in Data Analytics by anonymous
• 31,840 points
148 views
0 votes
1 answer

What is the Difference in Size and Count in pandas (python)?

The major difference is size includes NaN ...READ MORE

answered Apr 30, 2018 in Data Analytics by DeepCoder786
• 1,720 points
755 views
0 votes
2 answers
0 votes
1 answer

Converting a pandas data-frame to a dictionary

Emp_dict=Employee.to_dict('records') You can directly use the 'to_dict()' function ...READ MORE

answered May 23, 2018 in Data Analytics by Bharani
• 4,550 points
1,643 views
0 votes
1 answer

Adding values of common columns in pandas dataframe

Result = Set1.add(Set2)   x   y 0  70  ...READ MORE

answered May 30, 2018 in Data Analytics by Bharani
• 4,550 points
99 views
0 votes
7 answers
0 votes
1 answer