How can I compare one field of a table to calculate another field? I have a table containing 'SL', 'Name' and 'Value' fields. I need to calculate the total value each name have. Example is shown in the picture below. It will be great, if it would be Python script.
Vince
20.5k16 gold badges49 silver badges65 bronze badges
-
Welcome to GIS SE. Thank you for taking the Tour. Coding questions here are expected to include code. We don't expect perfection, just an honest attempt to solve the problem.Vince– Vince2020年04月12日 20:25:19 +00:00Commented Apr 12, 2020 at 20:25
-
1Just use the summary statistics tool the case field being your name field.Hornbydd– Hornbydd2020年04月12日 22:12:32 +00:00Commented Apr 12, 2020 at 22:12
1 Answer 1
arcpy.Statistics_analysis(<in_table>, <out_table>, [['Name','SUM']])
will create a new table with the values you're looking for.
answered Apr 12, 2020 at 20:23
lang-py