@@ -850,7 +850,7 @@ def test_resample_loffset_arg_type(self):
850
850
periods = len (df .index ) / 2 ,
851
851
freq = '2D' )
852
852
853
- # loffset coreces PeriodIndex to DateTimeIndex
853
+ # loffset coerces PeriodIndex to DateTimeIndex
854
854
if isinstance (expected_index , PeriodIndex ):
855
855
expected_index = expected_index .to_timestamp ()
856
856
@@ -2847,7 +2847,8 @@ def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
2847
2847
expected_index = self .create_index (df .index [0 ],
2848
2848
periods = len (df .index ) / 2 ,
2849
2849
freq = '2D' )
2850
- # loffset coreces PeriodIndex to DateTimeIndex
2850
+
2851
+ # loffset coerces PeriodIndex to DateTimeIndex
2851
2852
expected_index = expected_index .to_timestamp ()
2852
2853
expected_index += timedelta (hours = 2 )
2853
2854
expected = DataFrame ({'value' : expected_means }, index = expected_index )
@@ -2857,7 +2858,7 @@ def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
2857
2858
result_how = df .resample ('2D' , how = agg_arg , loffset = '2H' ,
2858
2859
kind = kind )
2859
2860
if isinstance (agg_arg , list ):
2860
- expected .columns = pd .MultiIndex .from_tuples ([('value' , 'mean' )])
2861
+ expected .columns = pd .MultiIndex .from_tuples ([('value' , 'mean' )])
2861
2862
assert_frame_equal (result_agg , expected )
2862
2863
assert_frame_equal (result_how , expected )
2863
2864
@@ -2868,6 +2869,7 @@ def test_upsampling_ohlc(self, freq, period_mult, kind):
2868
2869
pi = PeriodIndex (start = '2000' , freq = 'D' , periods = 10 )
2869
2870
s = Series (range (len (pi )), index = pi )
2870
2871
expected = s .to_timestamp ().resample (freq ).ohlc ().to_period (freq )
2872
+
2871
2873
# timestamp-based resampling doesn't include all sub-periods
2872
2874
# of the last original period, so extend accordingly:
2873
2875
new_index = PeriodIndex (start = '2000' , freq = freq ,
0 commit comments