I'm trying to split a field of street addresses (field name "PROP_STREE") so that it returns only the house number (so "123 Main St" would become "123").
Following the solution provided Field Calculator: Split address into house number, street name, I am using the following script:
def addressParser(inString): splitString = str(inString).split(' ') houseNumber = splitString return houseNumber PROP_NUM = addressParser(!PROP_STREE!)
But it keeps returning "Failed to execute. Parameters are not valid. ERROR 000989: Python syntax error: Parsing error SyntaxError: invalid syntax (line 6)."
What mistake am I making in my code?
Here's what the Field Calculator window looks like, for reference.
I'm using ArcGIS 10.6.1.