We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3de7139 commit da71a45Copy full SHA for da71a45
pandas/tests/groupby/test_grouping.py
@@ -203,6 +203,18 @@ def test_grouper_creation_bug(self):
203
expected = s.groupby(level='one').sum()
204
assert_series_equal(result, expected)
205
206
+ # GH25161
207
+ s = Series(np.arange(10),
208
+ index=pd.date_range(
209
+ "2018-11-26 16:17:43.51",
210
+ periods=10, freq="1S"))
211
+ t0 = s.index[0]
212
+ base = t0.minute + (t0.second + t0.microsecond / 1e6) / 60
213
+ g = s.groupby(pd.Grouper(freq="10min", base=base))
214
+ result = g.size()
215
+ expected = pd.Series(10, index=Index([t0]))
216
+ assert_series_equal(result, expected)
217
+
218
def test_grouper_column_and_index(self):
219
# GH 14327
220
0 commit comments