Hey team, I have an address field with the entire address in one cell, which looks like this one for example "15775 W California AVE ". I'm trying to pull out just the number portion so I can join it to another table. The format is inconsistent and some are 3 digits and some are 5 so its giving me more trouble than I was anticipating. Anyone know of a way to do this with a calculated field?
a = "15775 W California AVE"
"".join([i for i in a.split(" ")[0] if i.isdigit])
'15775' # for text output
int("".join([i for i in a.split(" ")[0] if i.isdigit]))
15775 # for integer output
a = "15775 W California AVE"
"".join([i for i in a.split(" ")[0] if i.isdigit])
'15775' # for text output
int("".join([i for i in a.split(" ")[0] if i.isdigit]))
15775 # for integer output