# xarray.DataArray.to_index

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

Convert this variable to a pandas.Index. Only possible for 1D
arrays.
