xarray.DataArray.reset_index¶
-
DataArray.
reset_index
(self, dims_or_levels: Union[Hashable, Sequence[Hashable]], drop: bool = False, inplace: bool = None) → Union[ForwardRef('DataArray'), NoneType]¶ Reset the specified index(es) or multi-index level(s).
- Parameters
dims_or_levels (hashable or sequence of hashables) – Name(s) of the dimension(s) and/or multi-index level(s) that will be reset.
drop (bool, optional) – If True, remove the specified indexes and/or multi-index levels instead of extracting them as new coordinates (default: False).
- Returns
obj – Another dataarray, with this dataarray’s data but replaced coordinates.
- Return type
See also