I'm trying to create a Python label expression in ArcGIS Pro for a parcel layer where I only want to label the parcel when a street number in the Address field is present.If a street number is not present I want label with a statement to identify missing address. I am labeling the address of the parcel. The field type is string.
Presently I was able to create an expression where I have identified NULLS and spaces in the field(see below) but I'd like to do the same for numbers since I have fields where street numbers are not present but streets names are present.
def FindLabel ( [ADDR],[ACRES_GIS] ): If ([ADDR]) in (None, " ",""," ") : return "<BOL><CLR red='200'>"+'ADDR Absent'+ "</CLR></BOL>" +"\n"+"ac: " [ACRES_GIS] else: return "Addr.: "+[ADDR].split(" ")+"\n"+"ac.: "+[ACRES_GIS]
Any suggestions on how to format such a script as the one I am describing?