BUG: The isna function returns False for NaN values in a column of type 'double [pyarrow]'. #60564
Closed
3 tasks done
Labels
Arrow
pyarrow functionality
Bug
Duplicate Report
Duplicate issue or pull request
PDEP missing values
Issues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprint
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
The isna function returns False for NaN values in the column
c
, which is of typedouble [pyarrow]
. The output of reproducible example is:It is clear that column
c
is 0/0, which is NaN, so it should beTrue
.Furthermore, if I assign the variable
n
to reference to columnc
and call pd.isna, it returns True.Output of this case is
True
.Expected Behavior
If I take use of numpy instead of pyarrow as dtype backend, it's as expected.
Expected behavior is:
The output is:
Installed Versions
INSTALLED VERSIONS
commit : 0691c5c
python : 3.12.6
python-bits : 64
OS : Darwin
OS-release : 23.6.0
Version : Darwin Kernel Version 23.6.0: Fri Nov 15 15:12:37 PST 2024; root:xnu-10063.141.1.702.7~1/RELEASE_ARM64_T6030
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : zh_CN.UTF-8
LOCALE : zh_CN.UTF-8
pandas : 2.2.3
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.9.0.post0
pip : 24.0
Cython : None
sphinx : None
IPython : 8.24.0
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : 4.12.3
blosc : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
html5lib : None
hypothesis : None
gcsfs : None
jinja2 : 3.1.4
lxml.etree : None
matplotlib : 3.9.0
numba : None
numexpr : None
odfpy : None
openpyxl : 3.1.3
pandas_gbq : None
psycopg2 : None
pymysql : None
pyarrow : 17.0.0
pyreadstat : None
pytest : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : 1.14.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlsxwriter : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: