# xarray.DataArray.str.title

#### DataArray.str.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('f436a3ef-a116-4daf-9a20-7e8482af9579','f1dbb362-847a-4f95-a609-1cf9a285baba','b2ad7346-5fbe-43ba-a076-21203089f9ec','../lite/tree/../notebooks/index.html?path=c8fee05a_9bb5_4980_bad9_eaf461e51f27.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="b2ad7346-5fbe-43ba-a076-21203089f9ec" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('f436a3ef-a116-4daf-9a20-7e8482af9579','b2ad7346-5fbe-43ba-a076-21203089f9ec')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('f436a3ef-a116-4daf-9a20-7e8482af9579','b2ad7346-5fbe-43ba-a076-21203089f9ec')">Open In Tab</button></div><div id="f1dbb362-847a-4f95-a609-1cf9a285baba" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
