I am trying to modify an existing table that I can relate to a feature in Arcmap(v10.5).
Currently, the table fields and values look like this:
I would like to summarize the table. For each unique "property number" value, I would like to have the table list unique "fagtype" values. And for each "fagtype value", I would like the table to sum the "fagacres" for each value. I would like the "facres" and "fagirrig" fields to just list unique values as well.
I found a starting place under the "search cursor" summary on the ESRI help page. But it's a very limited start and I'm not sure where to go from here, or even if a searchcursor is the best route.
import arcpy
agtable = arcpy.GetParameterAsText(0)
fields = ['PID', 'fagtype', 'fagacres', 'facres', 'fagirrig']
with arcpy.da.SearchCursor(agtable, fields) as cursor:
for row in cursor:
collections.defaultdict