-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
BUG: fix boolean array skipna=False for .any() and .all() #33284
BUG: fix boolean array skipna=False for .any() and .all() #33284
Conversation
Thanks for the PR - does this close a particular issue? Can you add tests? |
Don't worry about Travis that is failing (that's a general issue, there is already another PR trying to fix that) |
The any/all tests are here: pandas/pandas/tests/arrays/boolean/test_reduction.py Lines 15 to 39 in 164064d
so you can add to that test some new cases for the all-True and all-False cases from the issue. |
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.
pls add a whatsnew note in bug fixes Missing section for 1.1
can you also add a test case in panda/tests/reductions/test_reductions.py
def test_all_any_params(self) is the relevant test
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.
@linxiaow thanks for the updates. I suggested some rewording on the added whatsnew/comment
…n/test_reduction.py based on change suggestions related to issue pandas-dev#33253
Thanks @linxiaow ! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
I added "not self._mask.any()" to check if there is no missing value for both .any() and .all() when skipna is False. It looks fine for the example you provided.
