Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Delete Identical but Keep the most recent

$
0
0
Hello,
I receive data once a week from a third party vendor. There are 2 fields in which I wish to use to exclude duplicate.
rig_number, and a date field. Currently my script look like this. (standard delete identical code).


arcpy.DeleteIdentical_management(rigsFc,rig_number)

The thing is that I only care about the most recent one and this process seems to select one at random to keep. Is their a way to use delete identical but keep the attribute with the most current date?

Im using python 2.6 and arcMap 10.0

Thanks

Viewing all articles
Browse latest Browse all 2485

Trending Articles