I have a data frame df
like below:
name team
Peter A
Mary A
John B
Now I want to update John's team from B to C. I could loop over the dataframe, find the row with name = 'John'
, delete it and add a new row. However, I am wondering is there a more elegant way to do this? Thanks!