# xarray.Dataset.reorder_levels

`Dataset.``reorder_levels`(dim_order: Mapping[Hashable, Sequence[int]] = None, inplace: bool = None, **dim_order_kwargs) → xarray.core.dataset.Dataset

  Rearrange index levels using input order.

  Parameters:

  - 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.
  - **dim_order_kwargs (optional) – The keyword arguments form of `dim_order`. One of dim_order or dim_order_kwargs must be provided.

  Returns: | obj – Another dataset, with this dataset’s data but replaced coordinates.
  Return type: | Dataset