I have a table with parcel numbers in one field and soil types in another. There are several soil types for each parcel, and therefore several records for each parcel.
I am looking for a script (Python, SQL, VB, Arcade) that will iterate through each record grouped by APN, selecting (or outputting) the LAST record for each APN.
Example input table:
APN | SOIL TYPE |
---|---|
1 | A |
2 | A |
2 | A, B |
3 | A |
3 | A, E |
3 | A, E, G |
Desired result:
APN | SOIL TYPE |
---|---|
1 | A |
2 | A, B |
3 | A, E, G |
It's a simple task that seems like it should be easy, but I can't seem to find a solution. I've been working in Excel, ModelBuilder inside of ArcGIS Pro, and Python in Jupyter Notebook, but I'm not very well versed in any one program or language; maybe there's a better route of attack.
Thank you for any suggestions you might be able to provide!
Haven't checked all scenarios, but try this to get the index value for the elements of both