xarray.Dataset.stack (original) (raw)

Dataset.stack(dim=None, create_index=True, index_cls=<class 'xarray.core.indexes.PandasMultiIndex'>, **dim_kwargs)[source]#

Stack any number of existing dimensions into a single new dimension.

New dimensions will be added at the end, and by default the corresponding coordinate variables will be combined into a MultiIndex.

Parameters:

Returns:

stacked (Dataset) – Dataset with stacked data.