I need to create a python script that sums a column's values in a table. Thereafter, the script is supposed to get the percentage of each individual row in that column and populate this percentage values in a another column. I been struggling for quite some time now, I checked the net, but there is nothing of this sort. The nearest is an ArcGIS Discussion Forum thread, but its for an older version of ArcMap, or I am using it wrong.
import arcgisscripting, sys gp = arcgisscripting.create() intable = sys.argv field = sys.argv # Create search cursor rows = gp.SearchCursor(intable) row = rows.Next() x = 0.0 # Enter while loop for each feature/row while row: x += row.getvalue(field) print x row = rows.next() #note value can be rounded depending on field type gp.calculatefield(intable,sys.argv,float(x),"PYTHON")