I need to clean up some attribute tables and I'm having some difficulty finding a way to fix a certain issue. I have columns that have strings such as "Curb spalling, 3ftx4ftx6ft," and want to add spaces. I want it to look like this; "Curb spalling, 3 ft x 4 ft x 6 ft." I'm not very good with editing attributes in this manner so I was wondering what I could do, rather than having to do every single row of the column manually..Thanks!
You can replace text in tables. I'd start by replacing "ftx" with " ft x ", and then tackle the other edge cases.
That's about the only thing I could figure out, haha. The other part of my question is actually the issue!
Thank you though!!!
If I use something like this (Python parser):
txt_in = 'Curb spalling, 3ftx4ftx6ft'
txt_out = txt_in.replace('ft', ' ft').replace('x', ' x ')
print txt_in
print txt_out
this will yield:
Curb spalling, 3ftx4ftx6ft
Curb spalling, 3 ft x 4 ft x 6 ft
So probably try and use:
!YourFieldName!.replace('ft', ' ft').replace('x', ' x ')
Test this, writing to a new field, rather than replacing the existing values.