I'm having trouble field calculating everything left of the last space.
Ex. MAIN ST
Ex. BARE HALLOW DR
I am need of just "MAIN" and Just "BARE HALLOW" for my street names field without the post type. I started with full address (425 S MAIN ST) and have most of them narrowed down by the script bellow.
Ex: 4256 Monroe St
I want to select everything right and left of space.
s = 4256 Monroe St
s.split(" ", 1)[1].rsplit(" ", 1)[0]
Result: Monroe
Ex: Monroe St
I want everything before the space.
s= Monroe St
s.split(" ")[0]
Result: Monroe
Solved! Go to Solution.
See if this older post of mine can help.
See if this older post of mine can help.
Try this
Parser: Python
Expression
!StreetName!.rsplit(' ',1)[0]