# xarray.core.accessor_str.StringAccessor.title

#### StringAccessor.title()[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L756-L777)

Convert strings in the array to titlecase.

* **Returns:**
  **titled** (`same type as values`)

### Examples

<div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesShowIframe('47811d2e-a49a-49ac-a10b-3531a93e44eb','a50b7499-927c-477a-9710-06f71d7d9587','33ff06b7-77b1-44a8-90ff-bd53d0904891','../lite/tree/../notebooks/index.html?path=721e8965_fbd7_4434_b865_978a59221832.ipynb','None')">Try it in your browser!</button></div>
```pycon
>>> da = xr.DataArray(["temperature", "PRESSURE", "HuMiDiTy"], dims="x")
>>> da
<xarray.DataArray (x: 3)> Size: 132B
array(['temperature', 'PRESSURE', 'HuMiDiTy'], dtype='<U11')
Dimensions without coordinates: x
>>> titled = da.str.title()
>>> titled
<xarray.DataArray (x: 3)> Size: 132B
array(['Temperature', 'Pressure', 'Humidity'], dtype='<U11')
Dimensions without coordinates: x
```

<div id="33ff06b7-77b1-44a8-90ff-bd53d0904891" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('47811d2e-a49a-49ac-a10b-3531a93e44eb','33ff06b7-77b1-44a8-90ff-bd53d0904891')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('47811d2e-a49a-49ac-a10b-3531a93e44eb','33ff06b7-77b1-44a8-90ff-bd53d0904891')">Open In Tab</button></div><div id="a50b7499-927c-477a-9710-06f71d7d9587" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
