Skip to content

Commit 0f63098

Browse files
committed
fixups
1 parent 063b4af commit 0f63098

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

doc/source/whatsnew/v0.21.0.txt

+5-5
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ Previous Behavior:
188188
In [3]: resampled = s.resample('2Q').mean()
189189

190190
In [4]: resampled
191-
Out[4]:
191+
Out[4]:
192192
2017-03-31 1.0
193193
2017-09-30 5.5
194194
2018-03-31 10.0
@@ -223,14 +223,14 @@ Previous Behavior:
223223
In [2]: s = pd.Series(np.arange(10), index=pi)
224224

225225
In [3]: s.resample('H').ohlc()
226-
Out[3]:
226+
Out[3]:
227227
2000-01-01 00:00 0.0
228-
...
228+
...
229229
2000-01-10 23:00 NaN
230230
Freq: H, Length: 240, dtype: float64
231231

232232
In [4]: s.resample('M').ohlc()
233-
Out[4]:
233+
Out[4]:
234234
open high low close
235235
2000-01 0 9 0 9
236236

@@ -246,7 +246,7 @@ New Behavior:
246246

247247
s.resample('M').ohlc()
248248

249-
249+
250250
As a minor enhancement, resampling a ``PeriodIndex`` can now handle ``NaT`` values (:issue:`13224`)
251251

252252
.. _whatsnew_0210.api_breaking.deps:

pandas/tests/test_resample.py

-8
Original file line numberDiff line numberDiff line change
@@ -2817,14 +2817,6 @@ def test_evenly_divisible_with_no_extra_bins(self):
28172817
result = df.resample('7D').sum()
28182818
assert_frame_equal(result, expected)
28192819

2820-
def test_apply_to_empty_series(self):
2821-
# GH 14313
2822-
series = self.create_series()[:0]
2823-
2824-
for freq in ['M', 'D', 'H']:
2825-
with pytest.raises(TypeError):
2826-
series.resample(freq).apply(lambda x: 1)
2827-
28282820
@pytest.mark.parametrize('kind', ['period', None, 'timestamp'])
28292821
@pytest.mark.parametrize('agg_arg', ['mean', {'value': 'mean'}, ['mean']])
28302822
def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):

0 commit comments

Comments
 (0)