I am currently trying to get my update cursor to populate every row in each attribute table for 175 different feature class fields. I have written the script and it is populating the first row but all the next rows are coming out "NULL" (blank).
This is my script
import arcpy, csv
geodatabase = "C:\Users\kd16342\TSB_Values_Project\Tool\RasterTool.gdb"
csvfile = "C:\Users\kd16342\TSB_Values_Project\Documents\Scripts\ServicesforMosaic.csv" #change "Ecosystem Services" to "Ecosystem"
fields = ["Ecosystem","Cur_Con","Scale_Efft","Eff_Con","Recover","Typ_of_ser","Services","Eff_on_ser","Dur_s_aff","Reason","Eff_Durat","Unique_ID","Serv_ad_af","Serv_pe_af"]
arcpy.TableToTable_conversion(csvfile, geodatabase, "ServicesforMosaic")
for x in range (9,176):
with arcpy.da.SearchCursor(geodatabase+"//ServicesforMosaic",fields) as scursor:
for rw in scursor:
if rw[11] == str(x):
with arcpy.da.UpdateCursor("C:\Users\kd16342\TSB_Values_Project\Tool\RasterTool.gdb\Unique_ID_"+x,fields) as ucursor:
for row in ucursor:
row[0] = rw[0]
row[1] = rw[1]
row[2] = rw[2]
row[3] = rw[3]
row[4] = rw[4]
row[5] = rw[5]
row[6] = rw[6]
row[7] = rw[7]
row[8] = rw[8]
row[9] = rw[9]
row[10] = rw[10]
row[11] = rw[11]
row[12] = rw[12]
row[13] = rw[13]
ucursor.updateRow(row)
del cursor, row
All helped welcomed!!!