CÓMO

Convertir palabras en minúscula a mayúscula en un campo de cadena de caracteres en ArcGIS Pro

Last Published: July 18, 2023

Resumen

When using string functions such as capitalize or replace in the Calculate Fields tool to replace a lower case letter with an upper case in a string field, only specific letters are replaced. To convert all lower case letters in a string field to upper case, use the .upper() function instead.

In this example, all the lower case letters under the Layer field of the attribute table are converted to upper case.

An attribute table with the Layer field highlighted showing it has lower case letters.

Procedimiento

Follow the steps below to convert all the lower case letters in a string field to upper case with the Calculate Fields tool.

  1. Open the project in ArcGIS Pro.
  2. In the Contents pane, right-click the layer with the attribute table (in this example, Layer) and click Attribute Table.
  3. In the attribute table, right-click the field with the lower case letters to be converted and click Calculate Field Calculate Field icon. Ensure the Expression Type is Python3.
  4. Under the Expression section in the Calculate Field pane, select the field under the Fields list, and the select the .upper() function from the Helpers list.
Note:
Set the filter to the Text helper type to make the search for the .upper() function easier.

The expression reads as follows:

!<layer name>!.upper()

In this example, the expression reads:

!Layer!.upper()
The Expression section showing the full expression for the example: !Layer!.uppercase()
  1. Click Run. When the tool completes, all the lower case letters of the field are converted to upper case.
The attribute table with the Layer field highlighted showing all the letters are now upper case.
  1. Click the Save Edits button The Save Edits button in the Calculate Field pane to save the changes.

Id. de artículo:000022761

Obtener ayuda de expertos en ArcGIS

Contactar con soporte técnico

Descargar la aplicación de soporte de Esri

Ir a las opciones de descarga

Información relacionada

Descubrir más sobre este tema