BUG: Nullable Float64Dtype incorrectly converting NaN to NA when constructed with Arrow array #55668
Open
2 of 3 tasks
Labels
Bug
Needs Triage
Issue that has not been reviewed by a pandas team member
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
Presumably, the nullable
Float64Dtype()
is intended to allow users to disambiguate NaN from NA, but when constructing such a series from a pyarrow array (or casting to it viaastype(...)
, all NaNs are converted to NA.Expected Behavior
Installed Versions
In [3]: pd.show_versions()
/usr/local/google/home/swast/envs/bigframes/lib/python3.10/site-packages/_distutils_hack/init.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
INSTALLED VERSIONS
commit : e86ed37
python : 3.10.9.final.0
python-bits : 64
OS : Linux
OS-release : 6.5.3-1rodete1-amd64
Version : #1 SMP PREEMPT_DYNAMIC Debian 6.5.3-1rodete1 (2023-09-15)
machine : x86_64
processor :
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.1.1
numpy : 1.25.2
pytz : 2023.3.post1
dateutil : 2.8.2
setuptools : 65.5.0
pip : 23.2.1
Cython : None
pytest : 7.4.2
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.15.0
pandas_datareader : None
bs4 : None
bottleneck : None
dataframe-api-compat: None
fastparquet : None
fsspec : 2023.6.0
gcsfs : 2023.6.0
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 12.0.1
pyreadstat : None
pyxlsb : None
s3fs : None
scipy : 1.11.2
sqlalchemy : 2.0.20
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: