BUG: DataFrameGroupBy.sum ignores min_count for boolean data type · Issue #34051 · pandas-dev/pandas (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
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
but expected output is
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.