MCPcopy Index your code
hub / github.com/pydata/xarray / to_dataset

Method to_dataset

xarray/core/coordinates.py:1139–1144  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1137 return Frozen(self._data._coords)
1138
1139 def to_dataset(self) -> Dataset:
1140 from xarray.core.dataset import Dataset
1141
1142 coords = {k: v.copy(deep=False) for k, v in self._data._coords.items()}
1143 indexes = dict(self._data.xindexes)
1144 return Dataset._construct_direct(coords, set(coords), indexes=indexes)
1145
1146 def __delitem__(self, key: Hashable) -> None:
1147 if key not in self:

Callers

nothing calls this directly

Calls 3

itemsMethod · 0.80
copyMethod · 0.45
_construct_directMethod · 0.45

Tested by

no test coverage detected