How do you pass conditional statements from a list into a data access module update cursor?
I am using ArcGIS v10.3.1.
a = r"...\Default.gdb\New_Shapefile"
ConList = ["r[1] >= 1"]
with arcpy.da.UpdateCursor(a, ["Id", "apples"]) as uCur:
for r in uCur:
if ConList[0]:
r[0] = 99
uCur.updateRow(r)
Result is shown, highlighted rows should hold the pre-existing value of zero.
whereclause
as eluded to by @ed.hank