AnsweredAssumed Answered

Thousands Separator for Label Expression using Python

Question asked by cdspatial Champion on Oct 20, 2016
Latest reply on Oct 21, 2016 by CDow-esristaff

How does one use Python to format a number label so it shows the thousands separator?  For example, I have a value of 12345 that I want to display (from the Shape.Area field of a File Geodatabase feature class) on the map as a label as 12,345.

 

I looked at these discussions, but can't seem to get it to work.

What is label expression for formatting a number to have thousands separator and decimals? 

python - Add 'decimal-mark' thousands separators to a number - Stack Overflow 

 

 

I guess I could slice the value and insert commas, but I was hoping to use something easier.

 

I'm using ArcGIS 10.2.1 (so Python 2.7.5).  I'm a beginner in Python, so there is a good chance I am just missing something basic in trying to do this.

 

 

Chris Donohue, GISP

Outcomes