Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I want to import data out of a string field in my shapefile to a new field for labeling. The string field contains river names and codes and I just want to display the text i.e river names

share|improve this question
1  
could you post an example of the river names and codes? –  dango Jul 19 '12 at 10:41
add comment

1 Answer

In field calculator you can use this python function under the Show Codeblock option:

def removeNumbers(oldfield, newfield):
  newfield = ''.join([letter for letter in oldfield if not letter.isdigit()])
  return newfield

removeNumbers(!StringNumber!, !NoNumber!)
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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