@@ -844,7 +844,7 @@ def test_resample_loffset_arg_type(self):
844
844
periods = len (df .index ) / 2 ,
845
845
freq = '2D' )
846
846
847
- # loffset coreces PeriodIndex to DateTimeIndex
847
+ # loffset coerces PeriodIndex to DateTimeIndex
848
848
if isinstance (expected_index , PeriodIndex ):
849
849
expected_index = expected_index .to_timestamp ()
850
850
@@ -2799,7 +2799,8 @@ def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
2799
2799
expected_index = self .create_index (df .index [0 ],
2800
2800
periods = len (df .index ) / 2 ,
2801
2801
freq = '2D' )
2802
- # loffset coreces PeriodIndex to DateTimeIndex
2802
+
2803
+ # loffset coerces PeriodIndex to DateTimeIndex
2803
2804
expected_index = expected_index .to_timestamp ()
2804
2805
expected_index += timedelta (hours = 2 )
2805
2806
expected = DataFrame ({'value' : expected_means }, index = expected_index )
@@ -2809,7 +2810,7 @@ def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
2809
2810
result_how = df .resample ('2D' , how = agg_arg , loffset = '2H' ,
2810
2811
kind = kind )
2811
2812
if isinstance (agg_arg , list ):
2812
- expected .columns = pd .MultiIndex .from_tuples ([('value' , 'mean' )])
2813
+ expected .columns = pd .MultiIndex .from_tuples ([('value' , 'mean' )])
2813
2814
assert_frame_equal (result_agg , expected )
2814
2815
assert_frame_equal (result_how , expected )
2815
2816
@@ -2820,6 +2821,7 @@ def test_upsampling_ohlc(self, freq, period_mult, kind):
2820
2821
pi = PeriodIndex (start = '2000' , freq = 'D' , periods = 10 )
2821
2822
s = Series (range (len (pi )), index = pi )
2822
2823
expected = s .to_timestamp ().resample (freq ).ohlc ().to_period (freq )
2824
+
2823
2825
# timestamp-based resampling doesn't include all sub-periods
2824
2826
# of the last original period, so extend accordingly:
2825
2827
new_index = PeriodIndex (start = '2000' , freq = freq ,
0 commit comments