Skip to content

Commit c8814fb

Browse files
winklerandjreback
authored andcommitted
STYLE: added blank lines, removed odd whitespace, fixed typo
1 parent 432c623 commit c8814fb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

pandas/tests/test_resample.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ def test_resample_loffset_arg_type(self):
850850
periods=len(df.index) / 2,
851851
freq='2D')
852852

853-
# loffset coreces PeriodIndex to DateTimeIndex
853+
# loffset coerces PeriodIndex to DateTimeIndex
854854
if isinstance(expected_index, PeriodIndex):
855855
expected_index = expected_index.to_timestamp()
856856

@@ -2847,7 +2847,8 @@ def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
28472847
expected_index = self.create_index(df.index[0],
28482848
periods=len(df.index) / 2,
28492849
freq='2D')
2850-
# loffset coreces PeriodIndex to DateTimeIndex
2850+
2851+
# loffset coerces PeriodIndex to DateTimeIndex
28512852
expected_index = expected_index.to_timestamp()
28522853
expected_index += timedelta(hours=2)
28532854
expected = DataFrame({'value': expected_means}, index=expected_index)
@@ -2857,7 +2858,7 @@ def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
28572858
result_how = df.resample('2D', how=agg_arg, loffset='2H',
28582859
kind=kind)
28592860
if isinstance(agg_arg, list):
2860-
expected.columns = pd.MultiIndex .from_tuples([('value', 'mean')])
2861+
expected.columns = pd.MultiIndex.from_tuples([('value', 'mean')])
28612862
assert_frame_equal(result_agg, expected)
28622863
assert_frame_equal(result_how, expected)
28632864

@@ -2868,6 +2869,7 @@ def test_upsampling_ohlc(self, freq, period_mult, kind):
28682869
pi = PeriodIndex(start='2000', freq='D', periods=10)
28692870
s = Series(range(len(pi)), index=pi)
28702871
expected = s.to_timestamp().resample(freq).ohlc().to_period(freq)
2872+
28712873
# timestamp-based resampling doesn't include all sub-periods
28722874
# of the last original period, so extend accordingly:
28732875
new_index = PeriodIndex(start='2000', freq=freq,

0 commit comments

Comments
 (0)