Sunday, 2 September 2018

Finding empty attribute field with ArcPy search cursor?


I'm trying to iterate through all fields in my feature classes to find which fields are empty.


I have tried using the SearchCursor by borrowing bits of code from other answers.


This is what I have:


if fieldList:

with arcpy.da.SearchCursor(fc2, fieldList) as cursor:
for row in cursor:
if all(row)== NULL:
print row.name + "is empty"

Where am I going wrong?




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...