I need to update(clean) my data by following conditions
Check if PS-id has duplicate values.
Check which has the latest Date
Update the old row which has the latest Date and new Cam with the old Cam
ID Cam PS-id Date A1 Alto-Car A1222 1.1.2022 B1 BMW-Car A123 1.1.2022 A5 Car-Alto A1222 5.1.2022
The ideal output should be like this
ID Cam PS-id Date
A1 Car-Alto A1222 5.1.2022
B1 BMW-Car A123 1.1.2022