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

Method __delitem__

xarray/core/coordinates.py:1146–1155  ·  view source on GitHub ↗
(self, key: Hashable)

Source from the content-addressed store, hash-verified

1144 return Dataset._construct_direct(coords, set(coords), indexes=indexes)
1145
1146 def __delitem__(self, key: Hashable) -> None:
1147 if key not in self:
1148 raise KeyError(
1149 f"{key!r} is not in coordinate variables {tuple(self.keys())}"
1150 )
1151 assert_no_index_corrupted(self._data.xindexes, {key})
1152
1153 del self._data._coords[key]
1154 if key in self._data._indexes:
1155 del self._data._indexes[key]
1156
1157 def _ipython_key_completions_(self):
1158 """Provide method for the key-autocompletions in IPython."""

Callers

nothing calls this directly

Calls 2

keysMethod · 0.80

Tested by

no test coverage detected