# xarray.IndexVariable.to_index

#### IndexVariable.to_index()[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/variable.py#L3324-L3333)

Convert this variable to a pandas.Index
