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
dimstr or sequence of str, optional

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

Returns
unstackedDataset

Dataset with unstacked data.

See also

Dataset.stack