I have a feature class and python list. Feature class has 80 fields and 500 records. List also has 80 sub-list and 500 elements in each. So basically they are same dimension so to say.
I want to copy all records in python sub-list to corresponding fields in feature class. I was refering to an earlier post:
How to update attributes of a shapefile using list values?
I tried the code below but it doesnot work. there is some logic error can anyone correct me.
Code:
fc = "Feature class"fields = [fname for f in arcpy.ListFields(fc)] l[row][col]i = 0cursor = arcpy.UpdateCursor(fc)for row in cursor: row = l cursor.UpdateRow(row) i = i+1
أكثر...
I want to copy all records in python sub-list to corresponding fields in feature class. I was refering to an earlier post:
How to update attributes of a shapefile using list values?
I tried the code below but it doesnot work. there is some logic error can anyone correct me.
Code:
fc = "Feature class"fields = [fname for f in arcpy.ListFields(fc)] l[row][col]i = 0cursor = arcpy.UpdateCursor(fc)for row in cursor: row = l cursor.UpdateRow(row) i = i+1
أكثر...