<?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: How to remove spaces with Calculate field in ArcMap? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384422#M30295</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Chris. I need to use it in the Model. I am not familiar how I can add this to the model... Is there any way to do it with Field Calculator?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Apr 2016 20:17:46 GMT</pubDate>
    <dc:creator>LianaSmith</dc:creator>
    <dc:date>2016-04-21T20:17:46Z</dc:date>
    <item>
      <title>How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384420#M30293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My values are padded with spaces. Sometimes it's "1", sometimes it's " 1" sometimes its "1&amp;nbsp; ".&lt;/P&gt;&lt;P&gt;I need to remove all the spaces before, between, after, wherever they appear...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 19:43:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384420#M30293</guid>
      <dc:creator>LianaSmith</dc:creator>
      <dc:date>2016-04-21T19:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384421#M30294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For leading and trailing whitespace, I would recommend using &lt;A href="http://www.tutorialspoint.com/python/string_strip.htm" title="http://www.tutorialspoint.com/python/string_strip.htm"&gt;Python String strip() Method&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="195944" class="image-1 jive-image" height="464" src="https://community.esri.com/legacyfs/online/195944_pastedImage_0.png" style="width: 386px; height: 464.495px;" width="386" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For any and all spaces, try replace:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="195945" class="image-2 jive-image" height="467" src="https://community.esri.com/legacyfs/online/195945_pastedImage_0.png" style="max-width: 1200px; max-height: 900px; width: 388px; height: 466.901px;" width="388" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:14:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384421#M30294</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2016-04-21T20:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384422#M30295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Chris. I need to use it in the Model. I am not familiar how I can add this to the model... Is there any way to do it with Field Calculator?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:17:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384422#M30295</guid>
      <dc:creator>LianaSmith</dc:creator>
      <dc:date>2016-04-21T20:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384423#M30296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sure, here's an example in the model (for replace):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="296" src="https://community.esri.com/legacyfs/online/195946_pastedImage_0.png" style="width: 436px; height: 296.058px;" width="436" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This tool is available under...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Data Management Tools&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Fields&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt; Calculate Field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:22:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384423#M30296</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2016-04-21T20:22:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384424#M30297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris, it works but I get zeros for some of the values..&lt;/P&gt;&lt;P&gt;For example, before I had "B", "&amp;nbsp; B", "000B2"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After calculation I get: "B", "000B", "000B2"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't want it to be "000B"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the rest of the records it worked fine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:31:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384424#M30297</guid>
      <dc:creator>LianaSmith</dc:creator>
      <dc:date>2016-04-21T20:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384425#M30298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you want to remove whitespace AND zeros? If you'd like to remove zeros as well, is it just leading zeros?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:34:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384425#M30298</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2016-04-21T20:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384426#M30299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris... I would wait until you get a list of all possible iterations, permutations and combinations that could be in the table.&amp;nbsp; This sounds like a test of the most horrible kind... working in modelbuilder...with an ever increasing list of new conditions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:56:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384426#M30299</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-21T20:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384427#M30300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to remove just the spaces. Some of the values should have zeros before them. The problem is that after calculation for the case "&amp;nbsp;&amp;nbsp; B" (three spaces before letter) I get "000B". It should become B, not 000B&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 20:57:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384427#M30300</guid>
      <dc:creator>LianaSmith</dc:creator>
      <dc:date>2016-04-21T20:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384428#M30301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was thinking along those lines since it sounds like scope is creeping a bit...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Liana,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just a warning, too - make sure you have a back-up of your data before running processes that are final!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 21:02:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384428#M30301</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2016-04-21T21:02:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384429#M30302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see now... that's strange - can you give your processes step-by-step? Are you positive "000B" wasn't the value before the strip/replace was executed? Could you possibly supply a file, without any identifiable info, exemplifying the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 21:11:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384429#M30302</guid>
      <dc:creator>ChrisSmith7</dc:creator>
      <dc:date>2016-04-21T21:11:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to remove spaces with Calculate field in ArcMap?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384430#M30303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the method of parsing the data isn't clear... here is an example that can result in zeros before and after.&lt;/P&gt;&lt;P&gt;Just call it ... to bee or not to bee...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; bee = "B"&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; "{!s:&amp;gt;04}".format(bee)&lt;/P&gt;&lt;P&gt;'000B'&lt;/P&gt;&lt;P&gt;&amp;gt;&amp;gt;&amp;gt; "{!s:&amp;lt;04}".format(bee)&lt;/P&gt;&lt;P&gt;'B000'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the parser also needs to be clarified&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Apr 2016 21:27:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-remove-spaces-with-calculate-field-in/m-p/384430#M30303</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-04-21T21:27:22Z</dc:date>
    </item>
  </channel>
</rss>

