def groups(self): if self._groups is not None: return self._groups if len(self.groupings) == 1: self._groups = self.primary.groups else: to_groupby = zip(*(ping.grouper for ping in self.groupings)) to_groupby = Index(to_groupby) axis = self.obj._get_axis(self.axis) self._groups = _tseries.groupby(axis, to_groupby) return self._groups
def groups(self): if self._groups is None: self._groups = _tseries.groupby(self.index, self.grouper) return self._groups