Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (19.9k points)

I have the following dataframe

  Name Age

0 Mike 23

1 Eric 25

2 Donna 23

3 Will 23

And I want to change the age of Mike. How can I do this?

1 Answer

0 votes
by (25.1k points)

Pandas Dataframes have an in-built function for updating value in a cell called the at method. For your case you can use it like this:

dafaframe.at[1,’Age']= 18

If you wish to get an in-depth understanding about pandas or data science in general you should check out this video:

Related questions

0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...