xarray.Dataset.reset_index

Dataset.reset_index(dims_or_levels, drop=False, inplace=None)

Reset the specified index(es) or multi-index level(s).

Parameters
dims_or_levelsstr or list

Name(s) of the dimension(s) and/or multi-index level(s) that will be reset.

dropbool, optional

If True, remove the specified indexes and/or multi-index levels instead of extracting them as new coordinates (default: False).

inplacebool, optional

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

Returns
objDataset

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