Pandas version checks
-
[x] I have checked that this issue has not already been reported.
-
[x] 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
all(pd.Series([None, 3,5], dtype=float) > 3)
all(pd.Series([None, 3,5], dtype='float[pyarrow]') > 3)
Issue Description
Do to the pyarrow nullable bool type, there is a TypeError and the behaviour is inconsistent:
all(pd.Series([None, 3,5], dtype=float) > 3)
Out[10]: False`
all(pd.Series([None, 3,5], dtype='float[pyarrow]') > 3)
Traceback (most recent call last):
File "C:\Users\Schleehauf\PycharmProjects\viodata\viotools.venv\Lib\site-packages\IPython\core\interactiveshell.py", line 3672, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "
Expected Behavior
Be consitant, fill the bool NA value with False for the next xxx releases and maybe add a DeprecationWarning
Installed Versions
Comment From: rhshadrach
Thanks for the report!
Be consitant, fill the bool NA value with False
I think you're asking for pandas to somehow override the behavior of just all(...)
and not impact bool(pd.NA)
. I do not think this is possible.
On the other hand, there are many issues and discussions about bool(pd.NA)
, I do not think it is useful to have another one. Closing.