# xarray.DataArray.str.title

#### DataArray.str.title()[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L771-L791)

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('eb2bbc42-d35c-4eb2-a6c9-59e727c41f5c','567f61cd-c326-4c48-9a40-82e2bd3f1fac','fb3d4e4f-c8ca-4c7c-8b2b-3b5b4a492e2e','../lite/tree/../notebooks/index.html?path=4ec2ed54_5999_449a_b988_435363c656c1.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="fb3d4e4f-c8ca-4c7c-8b2b-3b5b4a492e2e" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('eb2bbc42-d35c-4eb2-a6c9-59e727c41f5c','fb3d4e4f-c8ca-4c7c-8b2b-3b5b4a492e2e')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('eb2bbc42-d35c-4eb2-a6c9-59e727c41f5c','fb3d4e4f-c8ca-4c7c-8b2b-3b5b4a492e2e')">Open In Tab</button></div><div id="567f61cd-c326-4c48-9a40-82e2bd3f1fac" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
