I have a dataframe which looks like this (with a lot more rows and columns)-
┌────────┬────────────┬────────────┐
│ email ┆ col1 ┆ col2 │
│ --- ┆ --- ┆ --- │
│ str ┆ str ┆ str │
╞════════╪════════════╪════════════╡
│ email1 ┆ val_col1_1 ┆ val_col2_1 │
│ email2 ┆ val_col1_2 ┆ val_col2_2 │
│ email3 ┆ val_col1_3 ┆ val_col2_3 │
└────────┴────────────┴────────────┘
How can I efficiently update values in the given columns based on checks done for the email column?
This is basically what I want to do
UPDATE df SET col1="someNewValue" WHERE email="someGivenEmail";
I tried iterating over the dataframe to fetch rows which I then tried to update but I couldn't find a function which gives a mutable reference to a row.