Created
November 18, 2015 22:23
-
-
Save andybell/fbed8ab9daa923a8cdcb to your computer and use it in GitHub Desktop.
field calculator replace zero values with null
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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!) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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