# xarray.DataArray.to_index

#### DataArray.to_index()[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/dataarray.py#L956-L961)

Convert this variable to a pandas.Index.

Only possible for 1D arrays.
