Pandas version checks
Reproducible Example
import pandas as pd
s = pd.Series([False, None], dtype="boolean")
df = s.to_frame("a")
s.any(skipna=False)
df.any(skipna=False)
Issue Description
DataFrame.any(skipna=False) and DataFrame.all(skipna=False) raise ValueError: cannot convert float NaN to bool on numpy-nullable columns (boolean, Int*, UInt*, Float*) whenever the reduction would propagate pd.NA.
The corresponding Series.any/all(skipna=False) reductions on the same data correctly return pd.NA.
Expected Behavior
DataFrame.any(skipna=False) and DataFrame.all(skipna=False) should return a Series with nullable boolean dtype (boolean) containing pd.NA when the corresponding Series.any/all(skipna=False) reduction on the same column returns pd.NA.
Installed Versions
Details
INSTALLED VERSIONS
commit : 2a7587f
python : 3.12.12
python-bits : 64
OS : Windows
OS-release : 11
Version : 10.0.26200
machine : AMD64
processor : Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252
pandas : 3.1.0.dev0+526.g2a7587fed0.dirty
numpy : 2.4.2
dateutil : 2.9.0.post0
pip : 26.0.1
Cython : 3.2.4
sphinx : None
IPython : 9.10.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : 1.6.0
fastparquet : None
fsspec : None
html5lib : None
hypothesis : 6.151.6
gcsfs : None
jinja2 : None
lxml.etree : None
matplotlib : 3.10.8
numba : None
numexpr : 2.14.1
odfpy : None
openpyxl : None
psycopg2 : None
pymysql : None
pyarrow : None
pyiceberg : None
pyreadstat : None
pytest : 9.0.2
python-calamine : None
pytz : 2025.2
pyxlsb : None
s3fs : None
scipy : 1.17.0
sqlalchemy : 2.0.46
tables : None
tabulate : 0.9.0
xarray : None
xlrd : None
xlsxwriter : None
zstandard : None
qtpy : None
pyqt5 : None
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
DataFrame.any(skipna=False)andDataFrame.all(skipna=False)raiseValueError: cannot convert float NaN to boolon numpy-nullable columns (boolean,Int*,UInt*,Float*) whenever the reduction would propagatepd.NA.The corresponding
Series.any/all(skipna=False)reductions on the same data correctly returnpd.NA.Expected Behavior
DataFrame.any(skipna=False)andDataFrame.all(skipna=False)should return aSerieswith nullable boolean dtype (boolean) containingpd.NAwhen the correspondingSeries.any/all(skipna=False)reduction on the same column returnspd.NA.Installed Versions
Details
INSTALLED VERSIONS
commit : 2a7587f
python : 3.12.12
python-bits : 64
OS : Windows
OS-release : 11
Version : 10.0.26200
machine : AMD64
processor : Intel64 Family 6 Model 183 Stepping 1, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : English_United States.1252
pandas : 3.1.0.dev0+526.g2a7587fed0.dirty
numpy : 2.4.2
dateutil : 2.9.0.post0
pip : 26.0.1
Cython : 3.2.4
sphinx : None
IPython : 9.10.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : 1.6.0
fastparquet : None
fsspec : None
html5lib : None
hypothesis : 6.151.6
gcsfs : None
jinja2 : None
lxml.etree : None
matplotlib : 3.10.8
numba : None
numexpr : 2.14.1
odfpy : None
openpyxl : None
psycopg2 : None
pymysql : None
pyarrow : None
pyiceberg : None
pyreadstat : None
pytest : 9.0.2
python-calamine : None
pytz : 2025.2
pyxlsb : None
s3fs : None
scipy : 1.17.0
sqlalchemy : 2.0.46
tables : None
tabulate : 0.9.0
xarray : None
xlrd : None
xlsxwriter : None
zstandard : None
qtpy : None
pyqt5 : None