Skip to content

Instantly share code, notes, and snippets.

@bvanderlugt
Created April 27, 2020 02:04
Show Gist options
  • Save bvanderlugt/2f9c76e8d330faf4e41dbe1d4cfeb598 to your computer and use it in GitHub Desktop.
Save bvanderlugt/2f9c76e8d330faf4e41dbe1d4cfeb598 to your computer and use it in GitHub Desktop.
arcpy
import arcpy
env.workspace = "C:/SpatialProgramming/TermProject/tp.gdb"
fc = "chem"
fields = ['SCNTFC_CD', 'EST_CVR_RT', 'TRT_QTY', 'OBJECTID']
# fields = ['WELL_ID', 'WELL_TYPE', 'SHAPE@XY']
# For each row print the WELL_ID and WELL_TYPE fields, and the
# the feature's x,y coordinates
with arcpy.da.SearchCursor(fc, fields) as cursor:
for row in cursor:
if (row[0] is None) and ((row[1] is None) or (row[2] is None)):
print('Condition found - OBJECT ID: {0}'.format(row[3])) # print OBECTID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment