<?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: Rounding, concatenating, and stacking labels in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/rounding-concatenating-and-stacking-labels/m-p/418206#M32845</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/89841"&gt;Chris Kelley&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a good thing to move away from VBScript since it is no longer support in ArcGIS (and by Microsoft). In Python you would probably want to use something like this:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;!Acres!&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\n"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; !SqMi!&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although it is a very good thing to start to learn Python, it might not be the best option for labeling. When you want this to work across the platform you might want to check Arcade expression language:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/arcade/" title="https://developers.arcgis.com/arcade/"&gt;ArcGIS Arcade | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; This will be supported in ArcGIS Pro (Desktop), Web maps in AGOL and Enterprise and mobile apps.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 29 Dec 2019 21:14:49 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2019-12-29T21:14:49Z</dc:date>
    <item>
      <title>Rounding, concatenating, and stacking labels</title>
      <link>https://community.esri.com/t5/python-questions/rounding-concatenating-and-stacking-labels/m-p/418205#M32844</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So this is the simplest question ever, maybe.&amp;nbsp; I am trying to move from using #vbscript to #Python in labeling expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me translate this simple vbscript line into python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;round([Acres],1) &amp;amp; vbnewline &amp;amp; [SqMi]&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can concatenate and stack lines in python. I can round in python. I can't do both at the same time though.&amp;nbsp; Python newbie.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Dec 2019 21:44:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/rounding-concatenating-and-stacking-labels/m-p/418205#M32844</guid>
      <dc:creator>ChrisKelley</dc:creator>
      <dc:date>2019-12-26T21:44:42Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding, concatenating, and stacking labels</title>
      <link>https://community.esri.com/t5/python-questions/rounding-concatenating-and-stacking-labels/m-p/418206#M32845</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/89841"&gt;Chris Kelley&lt;/A&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is a good thing to move away from VBScript since it is no longer support in ArcGIS (and by Microsoft). In Python you would probably want to use something like this:&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;round&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;!Acres!&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\n"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; !SqMi!&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although it is a very good thing to start to learn Python, it might not be the best option for labeling. When you want this to work across the platform you might want to check Arcade expression language:&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/arcade/" title="https://developers.arcgis.com/arcade/"&gt;ArcGIS Arcade | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; This will be supported in ArcGIS Pro (Desktop), Web maps in AGOL and Enterprise and mobile apps.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Dec 2019 21:14:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/rounding-concatenating-and-stacking-labels/m-p/418206#M32845</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2019-12-29T21:14:49Z</dc:date>
    </item>
  </channel>
</rss>

