1

How can I say in ArcGIS Pro if the field (String) is Null, then replace it with "No"?

I was trying this:

database_field.replace("Null","No")

No error occurred, but the null values did not change...

1

If you are working in a gdb file you can use these commands in a python window even without starting an edit session:

>>> with arcpy.da.UpdateCursor ("layer", 'database_field', 'database_field IS NULL') as uc:
...     for row in uc:
...         row[0] = 'No'
...         uc.updateRow (row)
...         
>>> 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.