Exemplo n.º 1
0
 def get_partition_selections(self, selection):
     if isinstance(selection, slice):
         interval = TimeInterval.from_slice(selection)
         return self._get_partition_selection_s_from_interval(interval)
     elif isinstance(selection, TimeInterval):
         return self._get_partition_selection_s_from_interval(selection)
     elif isinstance(selection, pd.DatetimeIndex):
         return self._get_partition_selection_s_from_index(selection)
     else:
         raise NotImplementedError('')
Exemplo n.º 2
0
 def get_internal_partition_selections(self, interval):
     """
     :param interval:
     :return: [(<partition key>, selection)]
     """
     if isinstance(interval, slice):
         interval = TimeInterval.from_slice(interval)
         return self._get_internal_partition_selection_s_from_interval(
             interval)
     elif isinstance(interval, TimeInterval):
         return self._get_internal_partition_selection_s_from_interval(
             interval)
     else:
         raise TypeError('')