HOW TO
In ArcGIS Pro, the display format of a numeric field in a layer can be manually configured in the fields view. However, this method applies only to a field or layer at a time.
Alternatively, ArcPy can be used to programmatically control the display format of numeric fields across multiple fields or layers by using the Cartographic Information Model (CIM) while retaining the original data values or field type. The CIM is a structured representation of layer properties that provides access to field display settings unavailable through standard ArcPy functionality.
This article describes the workflow to set the display format of numeric fields with double and float data types in a layer using ArcPy in ArcGIS Pro. In this example, a decimal format is changed to a whole number.

Note: Avoid pressing Enter between lines, as it creates indentation errors. The full script must be run at once.
import arcpy
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps()[0]
lyr = m.listLayers('<Layer_Name>')[0] #Replace <Layer_Name> to the layer name
lyr_cim = lyr.getDefinition('V3')
fList = ["<Field_Name1>", "<Field_Name2>"] #Replace <Field_Name1> and <Field_Name2> with the field names
if len(lyr_cim.featureTable.fieldDescriptions) == 0:
print('No CIM Field Info')
mkLyr = arcpy.management.MakeFeatureLayer(lyr)[0]
mkLyr_cim = mkLyr.getDefinition('V3')
for fd in mkLyr_cim.featureTable.fieldDescriptions:
if fd.fieldName in fList:
fd.numberFormat.roundingOption = "esriRoundNumberOfDecimals"
fd.numberFormat.roundingValue = 0
fd.numberFormat.zeroPad = True
mkLyr.setDefinition(mkLyr_cim)
lyr_cim.featureTable.fieldDescriptions = mkLyr_cim.featureTable.fieldDescriptions lyr.setDefinition(lyr_cim) m.removeLayer(mkLyr)
The code below shows the complete script.
import arcpy
p = arcpy.mp.ArcGISProject('current')
m = p.listMaps()[0]
lyr = m.listLayers('TestingNumeric_Point')[0]
lyr_cim = lyr.getDefinition('V3')
fList = ["VALUE1", "VALUE2"]
if len(lyr_cim.featureTable.fieldDescriptions) == 0:
print('No CIM Field Info')
mkLyr = arcpy.management.MakeFeatureLayer(lyr)[0]
mkLyr_cim = mkLyr.getDefinition('V3')
for fd in mkLyr_cim.featureTable.fieldDescriptions:
if fd.fieldName in fList:
fd.numberFormat.roundingOption = "esriRoundNumberOfDecimals"
fd.numberFormat.roundingValue = 0
fd.numberFormat.zeroPad = True
mkLyr.setDefinition(mkLyr_cim)
lyr_cim.featureTable.fieldDescriptions = mkLyr_cim.featureTable.fieldDescriptions
lyr.setDefinition(lyr_cim)
m.removeLayer(mkLyr)
The pop-up below displays the formatted numeric field values converted from decimals to whole numbers.

Article ID: 000042314
Get help from ArcGIS experts
Start chatting now