Пример #1
0
 def _unwind(self):
     res = self.expression.unwind(self.data,self.backend)
     self._ts = None
     self._xy = None
     if istimeseries(res):
         self._ts = res
     elif res and isinstance(res,list):
         tss = []
         xys = []
         for v in res:
             if istimeseries(v):
                 tss.append(v)
             elif isxy(v):
                 xys.append(v)
         if tss:
             self._ts = merge(tss)
         if xys:
             self._xy = xys
     elif isxy(res):
         self._xy = res
Пример #2
0
 def _unwind(self):
     res = self.expression.unwind(self.data, self.backend)
     self._ts = None
     self._xy = None
     if istimeseries(res):
         self._ts = res
     elif res and isinstance(res, list):
         tss = []
         xys = []
         for v in res:
             if istimeseries(v):
                 tss.append(v)
             elif isxy(v):
                 xys.append(v)
         if tss:
             self._ts = merge(tss)
         if xys:
             self._xy = xys
     elif isxy(res):
         self._xy = res
Пример #3
0
 def dump(self, format, **kwargs):
     ts = self.ts()
     xy = self.xy()
     if istimeseries(ts):
         ts = ts.dump(format, **kwargs)
     else:
         ts = None
     if xy:
         if isxy(xy):
             xy = [xy]
         for el in xy:
             ts = el.dump(format, container = ts, **kwargs)
     return ts
Пример #4
0
 def dump(self, format, **kwargs):
     ts = self.ts()
     xy = self.xy()
     if istimeseries(ts):
         ts = ts.dump(format, **kwargs)
     else:
         ts = None
     if xy:
         if isxy(xy):
             xy = [xy]
         for el in xy:
             ts = el.dump(format, container=ts, **kwargs)
     return ts