xarray.DataArray.reset_coords¶
-
DataArray.
reset_coords
(self, names: Union[Iterable[Hashable], Hashable, NoneType] = None, drop: bool = False, inplace: Union[bool, NoneType] = None) → Union[NoneType, ForwardRef('DataArray'), xarray.core.dataset.Dataset]¶ Given names of coordinates, reset them to become variables.
- Parameters
- nameshashable or iterable of hashables, optional
Name(s) of non-index coordinates in this dataset to reset into variables. By default, all non-index coordinates are reset.
- dropbool, optional
If True, remove coordinates instead of converting them into variables.
- inplacebool, optional
If True, modify this object in place. Otherwise, create a new object.
- Returns
- Dataset, or DataArray if
drop == True
, or None if inplace == True
- Dataset, or DataArray if