Closed
Description
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of pandas.
- (optional) I have confirmed this bug exists on the master branch of pandas.
Behavior is from master:
import pandas as pd
df = pd.DataFrame({"a": [1, 2], "b": pd.array([True, True])})
df.groupby("a").sum(min_count=2)
gives
b
a
1 True
2 True
but expected output is
b
a
1 <NA>
2 <NA>
It looks to me like there's an attempt to compute a Cythonized result which fails, after which point the min_count argument is forgotten.