Skip to content

Commit

Permalink
Update: add whatsnew entry and comments in pandas/tests/arrays/boolea…
Browse files Browse the repository at this point in the history
…n/test_reduction.py based on change suggestions related to issue pandas-dev#33253
  • Loading branch information
linxiaow committed Apr 6, 2020
1 parent 81860e3 commit 5d980ce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions doc/source/whatsnew/v1.1.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,7 @@ Missing
^^^^^^^

- Calling :meth:`fillna` on an empty Series now correctly returns a shallow copied object. The behaviour is now consistent with :class:`Index`, :class:`DataFrame` and a non-empty :class:`Series` (:issue:`32543`).
- Bug in :meth:`array.any` incorrectly returns ``<NA>`` for pandas.array of all ``False`` value, e.g. ``pd.array([False, False], dtype="boolean")``. Now it returns ``False`` (:issue:`33253`)
- Bug in :meth:`array.all` incorrectly returns ``<NA>`` for pandas.array of all ``True`` value, e.g. ``pd.array([True, True], dtype="boolean")``. Now it returns ``True``(:issue:`33253`)
- Bug in :meth:`~Series.any` and :meth:`~Series.all` incorrectly returning ``<NA>`` for all ``False`` or all ``True`` values using the nulllable boolean dtype and with ``skipna=False`` (:issue:`33253`)

MultiIndex
^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/arrays/boolean/test_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ def data():
)


# .any(), .all() returns <NA> for [False, False], [True, True], GH-33253.
@pytest.mark.parametrize(
"values, exp_any, exp_all, exp_any_noskip, exp_all_noskip",
[
([True, pd.NA], True, True, True, pd.NA),
([False, pd.NA], False, False, pd.NA, False),
([pd.NA], False, True, pd.NA, pd.NA),
([], False, True, False, True),
# GH-33253: all True / all False values buggy with skipna=False
([True, True], True, True, True, True),
([False, False], False, False, False, False),
],
Expand Down

0 comments on commit 5d980ce

Please sign in to comment.