Categories
Python Answers

How to set value for particular cell in Python Pandas DataFrame using index?

Spread the love

To set value for particular cell in Python Pandas DataFrame using index, we can use the set_value method.

For instance, we write

df.set_value('C', 'x', 10)

to set the value of the 'C‘ column in 'x' row of the df data frame to 10.

Leave a Reply

Your email address will not be published.

If you like the content of this blog, subscribe to my email list to get exclusive articles not available to anyone else.