Skip to content

Commit

Permalink
fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Sep 28, 2017
1 parent 063b4af commit 0f63098
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
10 changes: 5 additions & 5 deletions doc/source/whatsnew/v0.21.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ Previous Behavior:
In [3]: resampled = s.resample('2Q').mean()

In [4]: resampled
Out[4]:
Out[4]:
2017-03-31 1.0
2017-09-30 5.5
2018-03-31 10.0
Expand Down Expand Up @@ -223,14 +223,14 @@ Previous Behavior:
In [2]: s = pd.Series(np.arange(10), index=pi)

In [3]: s.resample('H').ohlc()
Out[3]:
Out[3]:
2000-01-01 00:00 0.0
...
...
2000-01-10 23:00 NaN
Freq: H, Length: 240, dtype: float64

In [4]: s.resample('M').ohlc()
Out[4]:
Out[4]:
open high low close
2000-01 0 9 0 9

Expand All @@ -246,7 +246,7 @@ New Behavior:

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


As a minor enhancement, resampling a ``PeriodIndex`` can now handle ``NaT`` values (:issue:`13224`)

.. _whatsnew_0210.api_breaking.deps:
Expand Down
8 changes: 0 additions & 8 deletions pandas/tests/test_resample.py
Original file line number Diff line number Diff line change
Expand Up @@ -2817,14 +2817,6 @@ def test_evenly_divisible_with_no_extra_bins(self):
result = df.resample('7D').sum()
assert_frame_equal(result, expected)

def test_apply_to_empty_series(self):
# GH 14313
series = self.create_series()[:0]

for freq in ['M', 'D', 'H']:
with pytest.raises(TypeError):
series.resample(freq).apply(lambda x: 1)

@pytest.mark.parametrize('kind', ['period', None, 'timestamp'])
@pytest.mark.parametrize('agg_arg', ['mean', {'value': 'mean'}, ['mean']])
def test_loffset_returns_datetimeindex(self, frame, kind, agg_arg):
Expand Down

0 comments on commit 0f63098

Please sign in to comment.