<?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: Arcpy code to remove decimal digits in symbology (ArcGIS Pro) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256655#M19755</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used the following code to get the results I was looking for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p = arcpy.mp.ArcGISProject("CURRENT")&lt;BR /&gt;m = p.listMaps()[0]&lt;BR /&gt;lyr = m.listLayers("layer_name")[0]&lt;BR /&gt;sym = lyr.symbology&lt;BR /&gt;if sym.renderer == "GraduatedColorsRenderer":&lt;BR /&gt;&amp;nbsp; &amp;nbsp; breaks = sym.renderer.classBreaks&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for b in breaks:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b_int = b.label[0:-7]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b.label = b_int&lt;BR /&gt;lyr.symbology= sym&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Dec 2017 15:43:28 GMT</pubDate>
    <dc:creator>Business_IntelligenceSoftware</dc:creator>
    <dc:date>2017-12-18T15:43:28Z</dc:date>
    <item>
      <title>Arcpy code to remove decimal digits in symbology (ArcGIS Pro)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256651#M19751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Whenever I perform the Summarize Within tool in ArcGIS Pro and use the graduated colors symbology on the resulting feature class, I end up with something that looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/390931_pastedImage_1.png" style="width: 113px; height: 194px;" /&gt;&lt;/P&gt;&lt;P&gt;Is there a way to remove all those zeros? In other words can I set the results to zero decimal places using Arcpy for ArcGIS Pro?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 16:58:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256651#M19751</guid>
      <dc:creator>Business_IntelligenceSoftware</dc:creator>
      <dc:date>2017-12-15T16:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy code to remove decimal digits in symbology (ArcGIS Pro)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256652#M19752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can begin within the &lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/classbreak-class.htm"&gt;&lt;STRONG&gt;ClassBreak&lt;/STRONG&gt;&lt;/A&gt; section.&amp;nbsp; I don't know how far down you can burrow to find out if they can be set to an integer value. I don't know how far along you have gotten.&amp;nbsp; Is there a need to use python and arcpy for this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 17:40:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256652#M19752</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-12-15T17:40:22Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy code to remove decimal digits in symbology (ArcGIS Pro)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256653#M19753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I need to use arcpy because I want to implement it into a larger script&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 17:42:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256653#M19753</guid>
      <dc:creator>Business_IntelligenceSoftware</dc:creator>
      <dc:date>2017-12-15T17:42:40Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy code to remove decimal digits in symbology (ArcGIS Pro)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256654#M19754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/classbreak-class.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;http://pro.arcgis.com/en/pro-app/arcpy/mapping/classbreak-class.htm&lt;/A&gt; but according to the code sample you have to format the labels yourself, which can be done using standard python formatting with the appropriate decimal specifier&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;a = 10000.0
"{:2.0f}".format(a)&amp;nbsp; # '10000'
"{:2.1f}".format(a)&amp;nbsp; # '10000.0'
"{:2.2f}".format(a)&amp;nbsp; # '10000.00'&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 12:39:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256654#M19754</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T12:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Arcpy code to remove decimal digits in symbology (ArcGIS Pro)</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256655#M19755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I used the following code to get the results I was looking for:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;p = arcpy.mp.ArcGISProject("CURRENT")&lt;BR /&gt;m = p.listMaps()[0]&lt;BR /&gt;lyr = m.listLayers("layer_name")[0]&lt;BR /&gt;sym = lyr.symbology&lt;BR /&gt;if sym.renderer == "GraduatedColorsRenderer":&lt;BR /&gt;&amp;nbsp; &amp;nbsp; breaks = sym.renderer.classBreaks&lt;BR /&gt;&amp;nbsp; &amp;nbsp; for b in breaks:&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b_int = b.label[0:-7]&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b.label = b_int&lt;BR /&gt;lyr.symbology= sym&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2017 15:43:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-code-to-remove-decimal-digits-in-symbology/m-p/256655#M19755</guid>
      <dc:creator>Business_IntelligenceSoftware</dc:creator>
      <dc:date>2017-12-18T15:43:28Z</dc:date>
    </item>
  </channel>
</rss>

