how to replace the duplicate numbers in column " received " in the attached sample with value zero but keeping the last or first value table using Python

how to replace the duplicate numbers in column " received " in the attached sample with value zero but keeping the last or first value table using Python
image

Do the detected duplicates have to be adjacent?

What should happen if the final line (DV0100343) had a received cell of 0.286? Should that be rewritten as 0, or should it stay 0.286?

In your example, all the duplicated “received” fields are in rows that also have duplicated “R_File” and “T_File” fields. Is this guaranteed? It might be easier to detect that duplication than just the one in “received”.