Skip to content

Commit e97c2e0

Browse files
simonjayhawkinsPingviinituutti
authored andcommitted
resample bin edge add test case (pandas-dev#23756)
1 parent cd27889 commit e97c2e0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pandas/tests/test_resample.py

+9
Original file line numberDiff line numberDiff line change
@@ -2515,6 +2515,15 @@ def test_resample_nonexistent_time_bin_edge(self):
25152515
result = expected.resample('900S').mean()
25162516
tm.assert_series_equal(result, expected)
25172517

2518+
# GH 23742
2519+
index = date_range(start='2017-10-10', end='2017-10-20', freq='1H')
2520+
index = index.tz_localize('UTC').tz_convert('America/Sao_Paulo')
2521+
df = DataFrame(data=list(range(len(index))), index=index)
2522+
result = df.groupby(pd.Grouper(freq='1D'))
2523+
expected = date_range(start='2017-10-09', end='2017-10-20', freq='D',
2524+
tz="America/Sao_Paulo")
2525+
tm.assert_index_equal(result.count().index, expected)
2526+
25182527
def test_resample_ambiguous_time_bin_edge(self):
25192528
# GH 10117
25202529
idx = pd.date_range("2014-10-25 22:00:00", "2014-10-26 00:30:00",

0 commit comments

Comments
 (0)