-1

enter image description here

I need to move address type to the column next to it, see photo for info. Any quick ways to do this? I am somewhat familiar with this process. I have tried the address toolbox to no avail.

  • 1
    I need some more clarification Kristen. By "Address Type" do you mean you want to populate OWNER_ST_T with ST, DR, AVE, etc.? So row1=DR, row2=AVE, row3=RD, etc? The CALLE may give us issues if this is the case. – John Aug 14 '15 at 18:20
  • That is correct. I would like to move and "DR .. AVE.. or RD types for street name to column "owner_st_t" – Kristen Aug 14 '15 at 20:08
2

I'd suggest something like this, because there probably aren't that many variations of street types:

code block:

def getType(streetname):
    street_type = ""
    types = ["DR","ST","AVE","CALLE"]
    words = streetname.split(" ")
    for type in types:
        if type in words:
            street_type = type
            break
    return street_type

expression:

getType(!OWNER_ST_1!)

I'd suggest running this, and then sorting the new field to find the blank ones. That way you'll be able to find new street types and add them to the list in the code block.

This method assumes that there will not be street names like "CALLE DEL MAR AVE" and that any "Saint" streets will be spelled "ST. JOHN ST" or "SAINT JOHN ST". Depending on your dataset, these may be unfair assumptions, so you'll need to do a little inspection.

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.