# 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('08a2d862-1399-4030-b31a-344c26927b42','99e2f7e0-926f-439b-bcaf-62cfeaa90fb0','cd1d5f50-0521-45f5-abe1-5b424f362712','../lite/tree/../notebooks/index.html?path=ed7750cb_37cc_4ba7_b7b3_a4002b425894.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="cd1d5f50-0521-45f5-abe1-5b424f362712" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('08a2d862-1399-4030-b31a-344c26927b42','cd1d5f50-0521-45f5-abe1-5b424f362712')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('08a2d862-1399-4030-b31a-344c26927b42','cd1d5f50-0521-45f5-abe1-5b424f362712')">Open In Tab</button></div><div id="99e2f7e0-926f-439b-bcaf-62cfeaa90fb0" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
