BUG: DataFrame.fillna() doesn't work for 0/0 with Int64Dtype #46677
Labels
Bug
Duplicate Report
Duplicate issue or pull request
NA - MaskedArrays
Related to pd.NA and nullable extension arrays
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
As shown above, creating a
pd.NA
value usingpd.Int64Dtype
as the dtype causes.fillna()
to malfunction..fillna(0.0)
still works after using.iloc[0]
.This behavior suddenly manifested when I upgraded to version 1.4.2. I am grabbing a table from Big Query and some of the columns are set to Int64Dtype.
Expected Behavior
Installed Versions
INSTALLED VERSIONS
commit : 4bfe3d0
python : 3.8.9.final.0
python-bits : 64
OS : Darwin
OS-release : 21.4.0
Version : Darwin Kernel Version 21.4.0: Mon Feb 21 20:35:58 PST 2022; root:xnu-8020.101.4~2/RELEASE_ARM64_T6000
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.4.2
numpy : 1.22.3
pytz : 2022.1
dateutil : 2.8.2
pip : 21.3.1
setuptools : 62.0.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.1
IPython : 8.2.0
pandas_datareader: None
bs4 : 4.10.0
bottleneck : None
brotli : None
fastparquet : None
The text was updated successfully, but these errors were encountered: