values = pd.timedelta_range("1 Day", periods=10_000).asi8
ser = pd.Series(values)
gb = ser.groupby(list(range(5)) * 2000)
result = gb.std()
expected = pd.Series([gb.get_group(i).std() for i in gb.groups])
>>> result - expected
0 192.0
1 192.0
2 192.0
3 192.0
4 192.0
dtype: float64
In the groupby std method we cast from ints to floats, which I don't think we do in the relevant Series code (in nanops). This is my best guess for the culprit in this mismatch.
In the groupby std method we cast from ints to floats, which I don't think we do in the relevant Series code (in nanops). This is my best guess for the culprit in this mismatch.