xarray.core.coordinates.DataArrayCoordinates.to_index

DataArrayCoordinates.to_index(ordered_dims=None)

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