I have a dataframe similar to
Name Value Value2
A 1 11
B 2 12
C 3 13
A 4 14
B 5 15
I need to take the rows were Name is a duplicate and replace the rows with the first occurrence with the last occurrence and then remove the last duplicates. So in this example the output would be
Name Value Value2
A 4 14
B 5 15
C 3 13
What would be a efficient way of doing this?