xarray.core.coordinates.DataArrayCoordinates.to_index

DataArrayCoordinates.to_index(self, ordered_dims: Sequence[Hashable] = None) → pandas.core.indexes.base.Index

Convert all index coordinates into a pandas.Index.

Parameters

ordered_dims (sequence of hashable, optional) – Possibly reordered version of this object’s dimensions indicating the order in which dimensions should appear on the result.

Returns

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.

Return type

pandas.Index