Esempio n. 1
0
 def test_resample_weekly_label_left(self):
     resampled = resample(self.date_curve, rule='W', label='left')
     dates = list(map(pd.Timestamp, ["2015-12-27", "2016-01-03"]))
     vals = [2, 5.5]
     self.assertEqual(resampled, Curve((dates, vals)))
Esempio n. 2
0
 def test_resample_weekly_closed_left(self):
     resampled = resample(self.date_curve, rule='W', closed='left')
     dates = list(map(pd.Timestamp, ["2016-01-03", "2016-01-10"]))
     vals = [1.5, 5]
     self.assertEqual(resampled, Curve((dates, vals)))
Esempio n. 3
0
 def test_resample_weekly(self):
     resampled = resample(self.date_curve, rule='W')
     dates = list(map(pd.Timestamp, ["2016-01-03", "2016-01-10"]))
     vals = [2, 5.5]
     self.assertEqual(resampled, Curve((dates, vals)))
 def test_resample_weekly_label_left(self):
     resampled = resample(self.date_curve, rule='W', label='left')
     dates = list(map(pd.Timestamp, ["2015-12-27", "2016-01-03"]))
     vals = [2, 5.5]
     self.assertEqual(resampled, Curve((dates, vals)))
 def test_resample_weekly_closed_left(self):
     resampled = resample(self.date_curve, rule='W', closed='left')
     dates = list(map(pd.Timestamp, ["2016-01-03", "2016-01-10"]))
     vals = [1.5, 5]
     self.assertEqual(resampled, Curve((dates, vals)))
 def test_resample_weekly(self):
     resampled = resample(self.date_curve, rule='W')
     dates = list(map(pd.Timestamp, ["2016-01-03", "2016-01-10"]))
     vals = [2, 5.5]
     self.assertEqual(resampled, Curve((dates, vals)))