I'm having trouble running a loop to update the values in a particular field in attribute table by reading from a csv file. Any input is greatly appreciated. The following is the sample code:
import arcpy
featureclass = "C:\\xyz"
table1 = "C:\\pqr.csv"
alpha= list(csv.reader(open(table1,'r')))
crows=arcpy.UpdateCursor(featureclass) # guess here it should be like cursor( , )
for crow in crows:
for row in alpha:
if crow.STNAME==row[3] and crow.ZIP==row[6]:
if int(crow.STNUM)>=int(row[13]) and int(crow.STNUM)<=int(row[14]):
if row[4]==crow.STTYPE and row[15]=="B":
# fill a field in attribute table with a particular row[] value from csv
else:
if int(crow.STNUM)%2==0 and row[4]==frow.STTYPE and row[15]=="E":
# fill the field in attribute table with a particular row[]value from csv