# 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('38dbcb5e-b4b5-4143-86ab-dbb170e40fe2','c5d69d56-7c1b-41c5-bbc3-f0563939827a','b4cc95b4-e963-4443-8101-345203992371','../lite/tree/../notebooks/index.html?path=8d3a335c_3e82_433e_ab15_12bac4201e7e.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="b4cc95b4-e963-4443-8101-345203992371" class="try_examples_outer_iframe  hidden"><div class="try_examples_button_container"><button class="try_examples_button" onclick="window.tryExamplesHideIframe('38dbcb5e-b4b5-4143-86ab-dbb170e40fe2','b4cc95b4-e963-4443-8101-345203992371')">Go Back</button><button class="try_examples_button" onclick="window.openInNewTab('38dbcb5e-b4b5-4143-86ab-dbb170e40fe2','b4cc95b4-e963-4443-8101-345203992371')">Open In Tab</button></div><div id="c5d69d56-7c1b-41c5-bbc3-f0563939827a" class="jupyterlite_sphinx_iframe_container"></div></div><script>document.addEventListener("DOMContentLoaded", function() {window.loadTryExamplesConfig("../try_examples.json");});</script>
