Exemplo n.º 1
0
 def _select_by_label_list_like(self, key):
     return self.__class__(
         to_flat_dict({k: self._grouped_data[k]
                       for k in key}),
         multiindex=self.multiindex,
         level_names=self.level_names,
     )
Exemplo n.º 2
0
 def _select_by_label_grouped(self, key):
     result = self._grouped_data[key]
     if isinstance(result, cudf.core.column.ColumnBase):
         return self.__class__({key: result})
     else:
         result = to_flat_dict(result)
         if not isinstance(key, tuple):
             key = (key, )
         return self.__class__(
             result,
             multiindex=self.nlevels - len(key) > 1,
             level_names=self.level_names[len(key):],
         )