<?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: Token function in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/token-function/m-p/604996#M47265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much, worked like a charm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some day I'll make the time to work through a python course, would save me so much time!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Heather&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 18:03:31 GMT</pubDate>
    <dc:creator>HeatherCarlos</dc:creator>
    <dc:date>2012-02-27T18:03:31Z</dc:date>
    <item>
      <title>Token function</title>
      <link>https://community.esri.com/t5/python-questions/token-function/m-p/604994#M47263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I need to parse some street addresses (stored as strings in one attribute field) to 2 separate fields ??? one for the house number, one for the street name.&amp;nbsp; Of course the addresses have varying lengths of house numbers (or sometimes none) and varying lengths of street names (and varying word count), so I can???t just use Left() or Right().&amp;nbsp; For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1 Main St &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;10 Main St &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;100 Maine Street &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;100 Main Podunk St &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Podunk St&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think I need to tokenize the string with the space as a deliminator, but I've never used python (and only basic VB scripts), so I'm getting lost as I troll through the various python resources.&amp;nbsp; Can someone help me out - I'd like to do this in the field calculator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Heather&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 17:17:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/token-function/m-p/604994#M47263</guid>
      <dc:creator>HeatherCarlos</dc:creator>
      <dc:date>2012-02-27T17:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Token function</title>
      <link>https://community.esri.com/t5/python-questions/token-function/m-p/604995#M47264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Heather,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can accomplish this using the Field Calculator and the 'split' method.&amp;nbsp; Example:&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;!FullAddr!.split(" ", 1)[0]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where 'FullAddr' represents the field name containing the address.&amp;nbsp; The above will return the house number.&amp;nbsp; To return the street name you would specify:&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;!FullAddr!.split(" ", 1)[1]&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Be sure 'Python' is checked at the top of the Field Calculator.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]12255[/ATTACH]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 18:00:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/token-function/m-p/604995#M47264</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2012-02-27T18:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Token function</title>
      <link>https://community.esri.com/t5/python-questions/token-function/m-p/604996#M47265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks so much, worked like a charm.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Some day I'll make the time to work through a python course, would save me so much time!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Heather&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 18:03:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/token-function/m-p/604996#M47265</guid>
      <dc:creator>HeatherCarlos</dc:creator>
      <dc:date>2012-02-27T18:03:31Z</dc:date>
    </item>
  </channel>
</rss>

