update

The update statements in SQL are used to filter data rows based on certain conditions and to update or modify certain values in those rows. In pandas, there is no particular keyword or function for doing this; instead, it is done by means of a direct assignment. Let's look at a few examples.

Suppose it was established that the data administrator had made a mistake in data collection. Due to this error, the data points where the age was actually 45 were randomly assigned a value greater than 35. To rectify this, we will update all such rows (age>35) to 45.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset