<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Simple question in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/simple-question/m-p/313614#M24387</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the code examples!&amp;nbsp; I was able to use one of them successfully....however, I didn't take into account some of the complexities that were mentioned.&amp;nbsp; I'm going to have to write a script thats a bit more complicated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Feb 2013 11:52:26 GMT</pubDate>
    <dc:creator>KellyVan_Allen</dc:creator>
    <dc:date>2013-02-08T11:52:26Z</dc:date>
    <item>
      <title>Simple question</title>
      <link>https://community.esri.com/t5/python-questions/simple-question/m-p/313610#M24383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm working with a large dataset, and I want to do something simple, but it's been a long time since I've used code.&amp;nbsp; I'm familiar with VB and somewhat with python.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have full road names...(ex. Main Street, First Street) in one field.&amp;nbsp; I need to populate another field with just the 'Main' or 'First' parts of the road name.&amp;nbsp; I'm pretty sure it's a simple script, and I have a lot of records to calculate.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be appreciated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 19:01:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-question/m-p/313610#M24383</guid>
      <dc:creator>KellyVan_Allen</dc:creator>
      <dc:date>2013-02-07T19:01:13Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question</title>
      <link>https://community.esri.com/t5/python-questions/simple-question/m-p/313611#M24384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kelly,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can do this in ArcMap using an expression in the calculate field similar to :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;left([fieldname],instr([fieldname]," ")-1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;the instr function gives the position of a text string within another , and the left function extracts a string from another one&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anthony&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 19:12:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-question/m-p/313611#M24384</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2013-02-07T19:12:53Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question</title>
      <link>https://community.esri.com/t5/python-questions/simple-question/m-p/313612#M24385</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would be easier to answer if you gave a larger sample of the kinds of values in your field you want to split. Do they always end in Street/Avenue etc?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Something like this may work for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;var.rsplit(' ', 1)[0]&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 19:13:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-question/m-p/313612#M24385</guid>
      <dc:creator>MathewCoyle</dc:creator>
      <dc:date>2013-02-07T19:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question</title>
      <link>https://community.esri.com/t5/python-questions/simple-question/m-p/313613#M24386</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That isn't very easy if you need to take in to account all of the possible variations for street names and you just want the "core" name. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For example:&amp;nbsp; N FRONT AVE&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S FRONT ST&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FRONT PKWY&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you just want to pull 'FRONT' out of that string, then you would need to know all of the possible street directional and suffix words.&amp;nbsp; (Suffixes: ROAD, RD, AVENUE, AVE, STREET, ST, etc...&amp;nbsp; Directionals: N, NORTH, NW, NORTHWEST, NORTH WEST, etc...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then it gets trickier if you have a street like :&amp;nbsp; NORTH PARKWAY AVENUE&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In that case you would have to take in to account the positional value of each string and maybe assume that since AVENUE is last it must be the suffix while PARKWAY is the street name - even though PARKWAY is a valid suffix word.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My work involves handling addresses all over the United States and we have significant parsing algorithms to handle all of the possible variations.&amp;nbsp; Having said all that, you could probably write something that is relatively simple and that would handle 70% of the possible addresses correctly.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 19:18:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-question/m-p/313613#M24386</guid>
      <dc:creator>KendallRussell</dc:creator>
      <dc:date>2013-02-07T19:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question</title>
      <link>https://community.esri.com/t5/python-questions/simple-question/m-p/313614#M24387</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the code examples!&amp;nbsp; I was able to use one of them successfully....however, I didn't take into account some of the complexities that were mentioned.&amp;nbsp; I'm going to have to write a script thats a bit more complicated!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 11:52:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-question/m-p/313614#M24387</guid>
      <dc:creator>KellyVan_Allen</dc:creator>
      <dc:date>2013-02-08T11:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: Simple question</title>
      <link>https://community.esri.com/t5/python-questions/simple-question/m-p/313615#M24388</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It would be even easier if you could split the data into different fields. There are standard fields for addresses, such as prefix, direction, name, suffix, etc. Not necessarily those field names, but that's the idea. Similar to what geolocators use. Of course, that may not be an option for you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 12:27:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/simple-question/m-p/313615#M24388</guid>
      <dc:creator>Zeke</dc:creator>
      <dc:date>2013-02-08T12:27:34Z</dc:date>
    </item>
  </channel>
</rss>

