Skip to content

Commit 8358c41

Browse files
committed
fixups
1 parent 398a684 commit 8358c41

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

doc/source/whatsnew/v0.21.0.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ Previous Behavior:
189189
In [3]: resampled = s.resample('2Q').mean()
190190

191191
In [4]: resampled
192-
Out[4]:
192+
Out[4]:
193193
2017-03-31 1.0
194194
2017-09-30 5.5
195195
2018-03-31 10.0
@@ -224,14 +224,14 @@ Previous Behavior:
224224
In [2]: s = pd.Series(np.arange(10), index=pi)
225225

226226
In [3]: s.resample('H').ohlc()
227-
Out[3]:
227+
Out[3]:
228228
2000-01-01 00:00 0.0
229-
...
229+
...
230230
2000-01-10 23:00 NaN
231231
Freq: H, Length: 240, dtype: float64
232232

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

@@ -247,7 +247,7 @@ New Behavior:
247247

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

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

253253
.. _whatsnew_0210.api_breaking.deps:

pandas/tests/test_resample.py

Lines changed: 0 additions & 8 deletions
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)