I have been combing the help associated with (None) values in arc, and have not been able to solve the following problem:
I have a a field with mixed Null and integer values:
0
100
I would like to transform the null values to 0's in python:
cursor = arcpy.UpdateCursor(fishJoin, ['myField']):
for row in cursor:
if row is None:
row = 0
cursor.updateRow(row)
This does not alter any of the null values.
I'm using ArcGIS Desktop 10.0.
fc = r'D:_data\sidewalk.gdb\repairs'
cursor = arcpy.UpdateCursor(fc)
for row in cursor: if row.FixedBy == None: row.YourFieldName = 'Contractor' cursor.updateRow(row)
print "Processing complete"
del row`
– cbunn Jun 08 '17 at 13:31