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.
I'd suggest something like this, because there probably aren't that many variations of street types:
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
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.