DEPR: numeic_only in Series and SeriesGroupBy consistency by rhshadrach · Pull Request #47561 · pandas-dev/pandas (original) (raw)

Thanks @mroeschke - running

ser = Series([0, 0, 1], dtype=object)
res = ser.rolling(2).sum(numeric_only=True)
print(res)

On 1.4.x, this succeeds and gives the same result as when dtype=int. On main, it raises NotImplementedError: Rolling.sum does not implement numeric_only. This PR exhibits the same behavior as main. I'll investigate this and do a followup to replace the breaking change with a deprecation.

I've changed the OP here so that the issue isn't closed.