Skip to content

Commit f12150b

Browse files
committed
STYLE: added blank lines, removed odd whitespace, fixed typo
1 parent 09d7ac3 commit f12150b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/test_resample.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -844,7 +844,7 @@ def test_resample_loffset_arg_type(self):
844844
periods=len(df.index) / 2,
845845
freq='2D')
846846

847-
# loffset coreces PeriodIndex to DateTimeIndex
847+
# loffset coerces PeriodIndex to DateTimeIndex
848848
if isinstance(expected_index, PeriodIndex):
849849
expected_index = expected_index.to_timestamp()
850850

@@ -2799,7 +2799,8 @@ def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
27992799
expected_index = self.create_index(df.index[0],
28002800
periods=len(df.index) / 2,
28012801
freq='2D')
2802-
# loffset coreces PeriodIndex to DateTimeIndex
2802+
2803+
# loffset coerces PeriodIndex to DateTimeIndex
28032804
expected_index = expected_index.to_timestamp()
28042805
expected_index += timedelta(hours=2)
28052806
expected = DataFrame({'value': expected_means}, index=expected_index)
@@ -2809,7 +2810,7 @@ def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
28092810
result_how = df.resample('2D', how=agg_arg, loffset='2H',
28102811
kind=kind)
28112812
if isinstance(agg_arg, list):
2812-
expected.columns = pd.MultiIndex .from_tuples([('value', 'mean')])
2813+
expected.columns = pd.MultiIndex.from_tuples([('value', 'mean')])
28132814
assert_frame_equal(result_agg, expected)
28142815
assert_frame_equal(result_how, expected)
28152816

@@ -2820,6 +2821,7 @@ def test_upsampling_ohlc(self, freq, period_mult, kind):
28202821
pi = PeriodIndex(start='2000', freq='D', periods=10)
28212822
s = Series(range(len(pi)), index=pi)
28222823
expected = s.to_timestamp().resample(freq).ohlc().to_period(freq)
2824+
28232825
# timestamp-based resampling doesn't include all sub-periods
28242826
# of the last original period, so extend accordingly:
28252827
new_index = PeriodIndex(start='2000', freq=freq,

0 commit comments

Comments
 (0)