Skip to content

Instantly share code, notes, and snippets.

@andybell
Created November 18, 2015 22:23
Show Gist options
  • Save andybell/fbed8ab9daa923a8cdcb to your computer and use it in GitHub Desktop.
Save andybell/fbed8ab9daa923a8cdcb to your computer and use it in GitHub Desktop.
field calculator replace zero values with null
# replace all zeros with <Null>, anything else keep the same
def replaceZero(value):
if value == 0:
return None
else:
return value
__esri_field_calculator_splitter__
replaceZero( !current_richness_Native_Fish!)
# replace all zeros with <Null>, anything else keep the same
def replaceZero(value):
if value == 0:
return None
else:
return value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment