Just to be clear, in this example data rows 9 and 10 have duplicate so only one would be left after dedupe. But then when you want to update you need to update both rows
Look at the post below for more info.
It retrieves all the row index of rows which match, then you can loop through and update each one.