Updating rows in SQL is performed using UPDATE
. Translated to pandas, apply the .loc method to set a value for selected fields.
Updating rows of a DataFrame
In SQL:
UPDATE
table
SET
column_1 = 100
WHERE
column_2 = 'A';
In pandas:
table.loc[table["column_2"] == 'A', table["column_1"]] = 100