How To: Remove and replace characters from a field in an attribute table
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 from a field to provide better readability.
Right-click the selected layer in the 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 the 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().
Note: Within the bracket in .replace(), type "-"," " to replace hyphens with a space.
Code: ![FieldName]!.replace("-"," ")
Click OK. The hyphens are removed.
In the Editor toolbar, select Stop Editing and Save Edits to keep the changes.