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:
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?
I used the following code to get the results I was looking for:
p = arcpy.mp.ArcGISProject("CURRENT")
m = p.listMaps()[0]
lyr = m.listLayers("layer_name")[0]
sym = lyr.symbology
if sym.renderer == "GraduatedColorsRenderer":
breaks = sym.renderer.classBreaks
for b in breaks:
b_int = b.label[0:-7]
b.label = b_int
lyr.symbology= sym