Dataset.reorder_levels(dim_order=None, inplace=None, **dim_order_kwargs)

Rearrange index levels using input order.

dim_order : optional

Mapping from names matching dimensions and values given by lists representing new level orders. Every given dimension must have a multi-index.

inplace : bool, optional

If True, modify the dataset in-place. Otherwise, return a new DataArray object.

**dim_order_kwargs: optional

The keyword arguments form of dim_order. One of dim_order or dim_order_kwargs must be provided.

obj : Dataset

Another dataset, with this dataset’s data but replaced coordinates.