diff --git a/doc/source/whatsnew/v1.1.0.rst b/doc/source/whatsnew/v1.1.0.rst index fcdd2fada2d62..da21b181217e3 100644 --- a/doc/source/whatsnew/v1.1.0.rst +++ b/doc/source/whatsnew/v1.1.0.rst @@ -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 ```` 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 ```` 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 ```` for all ``False`` or all ``True`` values using the nulllable boolean dtype and with ``skipna=False`` (:issue:`33253`) MultiIndex ^^^^^^^^^^ diff --git a/pandas/tests/arrays/boolean/test_reduction.py b/pandas/tests/arrays/boolean/test_reduction.py index ad600ce022525..5dd5620162a8a 100644 --- a/pandas/tests/arrays/boolean/test_reduction.py +++ b/pandas/tests/arrays/boolean/test_reduction.py @@ -12,7 +12,6 @@ def data(): ) -# .any(), .all() returns for [False, False], [True, True], GH-33253. @pytest.mark.parametrize( "values, exp_any, exp_all, exp_any_noskip, exp_all_noskip", [ @@ -20,6 +19,7 @@ def data(): ([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), ],