I am trying to split an address field in arcmap using the field calculator
for example...
2387 Resource Rd. Apartment 34
and i need to get rid of of the first set of numbers (2387)
Resource Rd. Apartment 34
I try using the split / lsplit / rsplit functions but i am doing something wrong.
any ideas?
thanks for your help in advance.
a = "first second third"
a.partition(" ")
Out[2]: ('first', ' ', 'second third')
will get you started
"".join(a.partition(" ")[1:]).strip()
'second third'
then use the bits
Thanks for your time and help.
Try this python expression
' '.join(!ADDRESS!.split(' ')[1:])
Thanks for your help, this works perfectly for what i need
partition will answer more questions that a simple split. It is often overlooked
a = "123 Main Street South"
# ---- partition, slice, and join
"".join(a.partition(" ")[1:]).strip()
'Main Street South'
# ---- split,slice, and join
"".join(a.split(" ")[1:])
'MainStreetSouth'
a = !Address! I use 'a' to represent the field
thanks a lot ... i really appreciate your time and help... I finally figure out ... using your advice and also using others advice that reply to my question...
this was my first time submitting a question and i was wondering how it will work... i have to say its awesome.
thanks again.
Glad it worked out Hugo
A little late in the game but here's a thread I started a couple years back and still refer back to:
https://community.esri.com/thread/163731