Summary
The instructions provided describe how to remove and replace characters from a field in an attribute table using the Field Calculator in ArcMap. In this example, the hyphen character ( - ) is replaced and removed to provide better readability.
Procedure
- Open ArcMap.
- Right-click the selected layer in Table Of Contents, and select Open Attribute Table.
- Start an edit session via the Editor toolbar for the selected layer.
- Right-click the field, and select Field Calculator....
- In Field Calculator, click the Python parser, and double-click the desired field name to insert the field name in the codeblock.
- Click the String radio button, and in the Functions list, click .replace().
- Within the bracket in .replace(), type "-"," " to replace hyphens with a space, as shown below.
Code:
![FieldName]!.replace("-"," ")
- Click OK. The hyphens are removed.
- In the Editor toolbar, select Stop Editing and click Save Edits to save the changes.