-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Summing a sparse boolean series raises TypeError #34220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
pandas/core/arrays/sparse/array.py
Outdated
@@ -1220,7 +1220,7 @@ def any(self, axis=0, *args, **kwargs): | |||
|
|||
return values.any().item() | |||
|
|||
def sum(self, axis=0, *args, **kwargs): | |||
def sum(self, axis=0, min_count=0, *args, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add to the doc-string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and type args if you can
pandas/core/arrays/sparse/array.py
Outdated
sp_sum = valid_vals.sum() | ||
if self._null_fill_value: | ||
if count < min_count: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you use array_ops/check_below_min_count
thanks! |
TypeError: sum() got an unexpected keyword argument 'min_count'
#25777black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff