I've been unable to solve this seemingly rudimentary issue of running a python snippet via the label expression option in ArcGIS. I've read this documentation Building label expressions, but wasn't able to get too far.
Can you assist me with the correct code to run to achieve labeling only years in the form of 2015, 2016 etc... and not label anything that has a 0?
I've read through and tried numerous iterations of code to run however all came with error except one. My examples and results are as follows:
Here is a screen shot of the attribute table and the current results, I've only achieved.
here is the first code I tried to run
def YearLabel ( [Most_Recen] ):
if int([Most_Recen]) = 0:
return " "
however an error results