예제 #1
0
 def test_create_time_series(self):
     records = [
         (datetime.date(2015, 9, 30), datetime.date(2002, 12, 31), 1),
         (datetime.date(2015, 9, 30), datetime.date(2001, 12, 31), 2),
         (datetime.date(2015, 8, 31), datetime.date(2001, 12, 31), 3),
     ]
     time_series = TimeSeries.create(records).get()
     self.assertEqual(time_series, [
         (datetime.date(2001, 12, 31), 2),
         (datetime.date(2002, 12, 31), 1),
     ])
예제 #2
0
 def test_create_time_series(self):
     records = [
         (datetime.date(2015, 9, 30), datetime.date(2002, 12, 31), 1), 
         (datetime.date(2015, 9, 30), datetime.date(2001, 12, 31), 2), 
         (datetime.date(2015, 8, 31), datetime.date(2001, 12, 31), 3), 
     ]
     time_series = TimeSeries.create(records).get()
     self.assertEqual(time_series, [
         (datetime.date(2001, 12, 31), 2),
         (datetime.date(2002, 12, 31), 1),
     ])
예제 #3
0
 def __init_value(self, param):
     output = {}
     database = Database()
     for account in param['account_list']:
         output[account] = TimeSeries.create(database.get(account, param))
     return output
예제 #4
0
 def __init_value(self, param):
     output = {}
     database = Database()
     for account in param["account_list"]:
         output[account] = TimeSeries.create(database.get(account, param))
     return output