<?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: Move last word to first word in field calculator in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109808#M62737</link>
    <description>&lt;P&gt;Just tried with field name, which absolutely works! Thanks kindly.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 21 Oct 2021 16:23:39 GMT</pubDate>
    <dc:creator>kat_h</dc:creator>
    <dc:date>2021-10-21T16:23:39Z</dc:date>
    <item>
      <title>Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109765#M62729</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;I'm trying to give watercourse names their French name from their English name, so I need to change the order of words a bit such as:&lt;/P&gt;&lt;P&gt;Wind Ruisseau -&amp;gt; Ruisseau Wind&lt;/P&gt;&lt;P&gt;I can remove Ruisseau with !Nom![:-9], but I can't figure out how to place it in the front with a space.&lt;/P&gt;&lt;P&gt;Some watercourse names hare three words like&lt;/P&gt;&lt;P&gt;West Wind Ruisseau&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would using an UpdateCursor be more simple than trying to figure out an expression in the Field Calculator?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:50:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109765#M62729</guid>
      <dc:creator>kat_h</dc:creator>
      <dc:date>2021-10-21T15:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109775#M62730</link>
      <description>&lt;P&gt;"West Wind"+' ' +"Ruisseau"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:59:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109775#M62730</guid>
      <dc:creator>ABishop</dc:creator>
      <dc:date>2021-10-21T15:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109779#M62731</link>
      <description>&lt;P&gt;I need to do it for thousands of unique names that end with "Ruisseau" and make them start with "Ruisseau"&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:00:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109779#M62731</guid>
      <dc:creator>kat_h</dc:creator>
      <dc:date>2021-10-21T16:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109786#M62732</link>
      <description>&lt;P&gt;Are the unique names in a specific field you can call out?&amp;nbsp; In this case, you could use the field calculator&amp;nbsp; to do this:&lt;/P&gt;&lt;P&gt;"Ruisseau"+' ' +[FIELD NAME]&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:05:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109786#M62732</guid>
      <dc:creator>ABishop</dc:creator>
      <dc:date>2021-10-21T16:05:26Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109790#M62734</link>
      <description>&lt;LI-CODE lang="python"&gt;&amp;gt;&amp;gt;&amp;gt; s = "Wind Ruisseau"
&amp;gt;&amp;gt;&amp;gt; " ".join(s.split()[::-1])
'Ruisseau Wind'
&amp;gt;&amp;gt;&amp;gt;&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:07:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109790#M62734</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-10-21T16:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109792#M62735</link>
      <description>&lt;P&gt;Ah yes, that's a much more simple solution than I was thinking. I think this should work, thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:08:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109792#M62735</guid>
      <dc:creator>kat_h</dc:creator>
      <dc:date>2021-10-21T16:08:15Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109802#M62736</link>
      <description>&lt;P&gt;Thanks! I'll give this a try as well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I make my field equal s?&amp;nbsp; like&amp;nbsp; s = !Nom! so it selects my selected rows from this field?&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:14:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109802#M62736</guid>
      <dc:creator>kat_h</dc:creator>
      <dc:date>2021-10-21T16:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109808#M62737</link>
      <description>&lt;P&gt;Just tried with field name, which absolutely works! Thanks kindly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:23:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109808#M62737</guid>
      <dc:creator>kat_h</dc:creator>
      <dc:date>2021-10-21T16:23:39Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109818#M62738</link>
      <description>&lt;P&gt;Hi Joshua,&lt;/P&gt;&lt;P&gt;Is there a way to I could keep the order of the middle words when there are three words in the string?&lt;/P&gt;&lt;P&gt;For example, this expression also reverses the names of the other words:&lt;/P&gt;&lt;P&gt;'West Wind Ruisseau' becomes 'Ruisseau Wind West'&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and I would like 'Ruisseau West Wind'&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:42:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109818#M62738</guid>
      <dc:creator>kat_h</dc:creator>
      <dc:date>2021-10-21T16:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109832#M62740</link>
      <description>&lt;P&gt;Here's another solution to consider.&lt;/P&gt;&lt;LI-CODE lang="python"&gt;s = "West Wind Ruisseau"
s = s.rsplit(" ", 1)
last_word = s.pop()
s = " ".join([last_word] + s)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 17:05:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109832#M62740</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2021-10-21T17:05:47Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109866#M62743</link>
      <description>&lt;P&gt;If you just want to make the last word the first word:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;&amp;gt;&amp;gt;&amp;gt; s = "West Wind Ruisseau"
&amp;gt;&amp;gt;&amp;gt; " ".join(s.split()[-1:]+s.split()[:-1])
'Ruisseau West Wind'
&amp;gt;&amp;gt;&amp;gt; &lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 21 Oct 2021 18:06:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1109866#M62743</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-10-21T18:06:40Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1110078#M62763</link>
      <description>&lt;P&gt;That makes sense! Thanks so much!&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 02:33:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1110078#M62763</guid>
      <dc:creator>kat_h</dc:creator>
      <dc:date>2021-10-22T02:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: Move last word to first word in field calculator</title>
      <link>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1110079#M62764</link>
      <description>&lt;P&gt;Thanks Blake! I was wondering to workaround it with pop() as well.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 02:34:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/move-last-word-to-first-word-in-field-calculator/m-p/1110079#M62764</guid>
      <dc:creator>kat_h</dc:creator>
      <dc:date>2021-10-22T02:34:23Z</dc:date>
    </item>
  </channel>
</rss>

