def result_index(self) -> Index: # TODO: what's the difference between result_index vs group_index? if self.all_grouper is not None: group_idx = self.group_index assert isinstance(group_idx, CategoricalIndex) return recode_from_groupby(self.all_grouper, self.sort, group_idx) return self.group_index
def result_index(self): if self.all_grouper is not None: from pandas.core.groupby.categorical import recode_from_groupby return recode_from_groupby(self.all_grouper, self.sort, self.group_index) return self.group_index
def result_index(self) -> Index: # result_index retains dtype for categories, including unobserved ones, # which group_index does not if self._all_grouper is not None: group_idx = self.group_index assert isinstance(group_idx, CategoricalIndex) return recode_from_groupby(self._all_grouper, self._sort, group_idx) return self.group_index
def result_index(self) -> Index: if self.all_grouper is not None: group_idx = self.group_index assert isinstance(group_idx, CategoricalIndex) # set in __init__ return recode_from_groupby(self.all_grouper, self.sort, group_idx) return self.group_index
def result_index(self) -> Index: if self.all_grouper is not None: return recode_from_groupby(self.all_grouper, self.sort, self.group_index) return self.group_index
def result_index(self): if self.all_grouper is not None: from pandas.core.groupby.categorical import recode_from_groupby return recode_from_groupby(self.all_grouper, self.sort, self.group_index) return self.group_index