xarray.Dataset.unstack

Dataset.unstack(dim=None)

Unstack existing dimensions corresponding to MultiIndexes into multiple new dimensions.

New dimensions will be added at the end.

Parameters:
dim : str or sequence of str, optional

Dimension(s) over which to unstack. By default unstacks all MultiIndexes.

Returns:
unstacked : Dataset

Dataset with unstacked data.

See also

Dataset.stack