With my company switching to ArcGIS Pro, I am having to relearn some stuff that I've always known to work. In Pro I accidentally added "ft" to every column rather than just one.

Is there a way to get rid of the "ft" within each column?

Attached is the picture of my issue.

enter image description here

  • 3
    That's interesting...out of curiosity, how did you do that? You could write a python script to fix it, but by the time you did that you could have probably just used calculate field manually on each field, with an expression like !field![:-3]. – Evil Genius Jun 28 '18 at 13:50
  • I imported the data from ArcMap, so that's why I currently have the "ft" in all of the columns - I accidentally added it in ArcMap and found out after bringing it into Pro. – MF1995 Jun 28 '18 at 13:54

You can use the .replace() function with python.

Right click your field, field calculator, !FIELDNAME!.replace('ft',''), that will replace all instances of ft with a blank, wherever it is in your field

  • Is there any chance you could do a pretend set up - so I can actually understand what word/field goes where in the calculator? – MF1995 Jun 28 '18 at 15:51
  • 1
    !FIELDNAME!.replace('ft','') – Maksim Jun 28 '18 at 17:13
  • It ended up not working - using the miniscule amount of experience I have in field calculator, I did: !Length!.replace("ft", " ") This worked perfectly. Couldn't have done it without your help! – MF1995 Jun 28 '18 at 18:10
  • 1
    yes, replace FIELDNAME with the name of your field – Maksim Jun 28 '18 at 18:41

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.