# xarray.core.coordinates.DatasetCoordinates.to_index

#### DatasetCoordinates.to_index(ordered_dims=None)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/coordinates.py#L121-L199)

Convert all index coordinates into a [`pandas.Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index).

* **Parameters:**
  **ordered_dims** ([sequence](https://docs.python.org/3/glossary.html#term-sequence) of [hashable](../user-guide/terminology.html.md#term-name), *optional*) – Possibly reordered version of this object’s dimensions indicating
  the order in which dimensions should appear on the result.
* **Returns:**
  [`pandas.Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index) – Index subclass corresponding to the outer-product of all dimension
  coordinates. This will be a MultiIndex if this object is has more
  than more dimension.
