Exemple #1
0
 def fill_missing_periods(self, start_date, end_date, collect=None):
     default = {"_count": 0}
     if collect:
         default.update((collect_key(k, v), None) for k, v in collect)
     for i, _ in enumerate(self._data):
         self._data[i]["values"] = timeseries(
             start=start_date, end=end_date, period=self._period, data=self._data[i]["values"], default=default
         )
 def fill_missing_periods(self, start_date, end_date, collect=None):
     default = {"_count": 0}
     if collect:
         default.update((collect_key(k, v), None) for k, v in collect)
     self._data = timeseries(start=start_date,
                             end=end_date,
                             period=self.period,
                             data=self._data,
                             default=default)
Exemple #3
0
 def fill_missing_periods(self, start_date, end_date, collect=None):
     default = {"_count": 0}
     if collect:
         default.update((collect_key(k, v), None) for k, v in collect)
     self._data = timeseries(start=start_date,
                             end=end_date,
                             period=self.period,
                             data=self._data,
                             default=default)
 def fill_missing_periods(self,
                          start_date,
                          end_date,
                          collect=None,
                          group_by=[]):
     default = {"_count": 0}
     if collect:
         default.update((collect_key(k, v), None) for k, v in collect)
     for i, _ in enumerate(self._data):
         self._data[i]['values'] = timeseries(start=start_date,
                                              end=end_date,
                                              period=self._period,
                                              data=self._data[i]['values'],
                                              default=default)
Exemple #5
0
    def fill_missing_periods(self, start_date, end_date, collect=None, group_by=[]):
        default = {"_count": 0}
        if collect:
            default.update((collect_key(k, v), None) for k, v in collect)

        filled_in_data = fill_group_by_permutations(start=start_date,
                                                    end=end_date,
                                                    period=self._period,
                                                    data=self._data,
                                                    default=default,
                                                    group_by=group_by,
                                                    )

        self._data = filled_in_data
        return filled_in_data
    def fill_missing_periods(self,
                             start_date,
                             end_date,
                             collect=None,
                             group_by=[]):
        default = {"_count": 0}
        if collect:
            default.update((collect_key(k, v), None) for k, v in collect)

        filled_in_data = fill_group_by_permutations(
            start=start_date,
            end=end_date,
            period=self._period,
            data=self._data,
            default=default,
            group_by=group_by,
        )

        self._data = filled_in_data
        return filled_in_data