MCPcopy
hub / github.com/pydata/xarray / _get_index_and_items

Method _get_index_and_items

xarray/groupers.py:553–560  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

551 self.group_as_index = group_as_index
552
553 def _get_index_and_items(self) -> tuple[pd.Index, pd.Series, np.ndarray]:
554 first_items, codes = self.first_items()
555 full_index = first_items.index
556 if first_items.isnull().any():
557 first_items = first_items.dropna()
558
559 full_index = full_index.rename("__resample_dim__")
560 return full_index, first_items, codes
561
562 def first_items(self) -> tuple[pd.Series, np.ndarray]:
563 if isinstance(self.index_grouper, CFTimeGrouper):

Callers 1

factorizeMethod · 0.95

Calls 5

first_itemsMethod · 0.95
anyMethod · 0.45
isnullMethod · 0.45
dropnaMethod · 0.45
renameMethod · 0.45

Tested by

no test coverage detected