I'm learning as I go , I can't figure out the correct script. I have data in a column named Full_Name which has 3 words ex: Arnault Branch Rd and I want to break it out to StreetName column to be just the first two words Arnault Branch. The Script I'm using is !Full_Name!.split(" ", 1)[0][enter image description here]1

  • 1
    Welcome to GIS SE! As a new user please take the tour to learn about our focused Q&A format. A good question should include detail of what you've already tried. Please edit your question to include details of your attempts, and of what happens when you try it. – Midavalo Sep 14 '17 at 17:33

You can use Python codeblock in field calculator:


def two_words(field):
    result = field.split(' ')
    return result[0] + ' ' + result[1]


two_words( !String!)

enter image description here

And the result:

enter image description here


Or without codeblock: u' '.join(!Field!.split()[:-1])

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.