From c253028c3eba9c54adc1142971045fd35769de21 Mon Sep 17 00:00:00 2001 From: Simon Hawkins Date: Sat, 17 Nov 2018 21:46:13 +0000 Subject: [PATCH] add test case --- pandas/tests/test_resample.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pandas/tests/test_resample.py b/pandas/tests/test_resample.py index 7e0342e8b987a..d38f2a237c31d 100644 --- a/pandas/tests/test_resample.py +++ b/pandas/tests/test_resample.py @@ -2515,6 +2515,15 @@ def test_resample_nonexistent_time_bin_edge(self): result = expected.resample('900S').mean() tm.assert_series_equal(result, expected) + # GH 23742 + index = date_range(start='2017-10-10', end='2017-10-20', freq='1H') + index = index.tz_localize('UTC').tz_convert('America/Sao_Paulo') + df = DataFrame(data=list(range(len(index))), index=index) + result = df.groupby(pd.Grouper(freq='1D')) + expected = date_range(start='2017-10-09', end='2017-10-20', freq='D', + tz="America/Sao_Paulo") + tm.assert_index_equal(result.count().index, expected) + def test_resample_ambiguous_time_bin_edge(self): # GH 10117 idx = pd.date_range("2014-10-25 22:00:00", "2014-10-26 00:30:00",