def get_group(self, name, obj=None):
        if obj is None:
            obj = self._selected_obj

        inds = self._get_index(name)
        if not len(inds):
            raise KeyError(name)

        return obj.take(inds, axis=self.axis, convert=False)
Constructs NDFrame from group with provided name
dataset/ETHPy150Open pydata/pandas/pandas/core/groupby.py/_GroupBy.get_group