DataArray.reset_index(dims_or_levels: Union[Hashable, Sequence[Hashable]], drop: bool = False, inplace: Optional[bool] = None) → Optional[xarray.core.dataarray.DataArray]

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

dims_or_levelshashable or sequence of hashables

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 dataarray in-place. Otherwise, return a new DataArray object.


Another dataarray, with this dataarray’s data but replaced coordinates. If inplace == True, return None.