0

My company has recently implemented ArcGIS Pro and I am completely useless when using it (so it feels). In ArcMap I could simply highlight a column with numbers in it, right click, choose properties and then pad with zeros so that every number has the same amount of digits. With Pro on the other hand, everything seems to be in Python, or else I would have to add padding manually...This is really putting a damper on my project which is due in a few weeks...any suggestions? Image below is what I want Pro attribute table to look like, but Pro attribute table gets rid of padding!

The image below is from ArcMap, and is what I am looking for.

5

you can use !FIELDNAME!.zfill(#)

So if you had a text field width 5 and a value in there such as 23, it would make it 00023, if thats what you are looking for.

  • How exactly would I add the zeros to the back end of those numbers? – MF1995 Jun 27 '18 at 15:37
  • !FIELDNAME!. ljust(width,[fillchar]) Insert the 0 in the fillchar part, and width of your field in width – Maksim Jun 27 '18 at 15:41
  • glad to help, approve the answer if so – Maksim Jun 27 '18 at 19:33
1

If you go ArcGIS Pro's new "Fields" view, there is a column for Number Format. Double click fields that are Numeric and a "..." should appear. Click that to open the number format options which should look familiar. It should have the same ArcMap options like Rounding, Alignment, and Pad with zeros. Make your changes and then be sure to "Save" the field changes.

  • This just saved my life lol. My next question: Is there a find/replace in Pro? – MF1995 Jun 27 '18 at 19:22
  • @MF1995 please don't use comments to ask new questions. If it is not in the help, then ask a new question. – PolyGeo Jun 27 '18 at 20:44
  • Sir yes sir - I am off to a new question! – MF1995 Jun 27 '18 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.