I'm using the following python code to replace Null values by 0, using field calculator:
def nulls(p1):
if p1 is None:
return 0
else:
return p1
But nothing happens, Null values stay. I'm using ArcGIS Desktop 10.0.
Answer
Since your code worked for me, a work around would be to use 'select by attribute' to select null rows e.g. MyField IS NULL. Once you have them all selected just use field calculator e.g. MyField = 0.
No comments:
Post a Comment