We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
pd.DataFrame({'a': [pd.NA]}).replace(pd.NA, None)
The replace function uses None instead of a sentinel value to check for a missing argument, thus it does not allow None to be used.
None
The fillna function also has this problem.
fillna
The replace function should allow the usage of None as a target value.
commit : 66e3805 python : 3.8.10.final.0 python-bits : 64 OS : Darwin OS-release : 20.6.0 Version : Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 machine : x86_64 processor : i386 byteorder : little LC_ALL : None LANG : en_GB.UTF-8 LOCALE : en_GB.UTF-8
pandas : 1.3.5 numpy : 1.18.5 pytz : 2021.3 dateutil : 2.8.2 pip : 21.3.1 setuptools : 59.8.0 Cython : 0.29.26 pytest : 6.2.5 hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : 1.1 pymysql : None psycopg2 : None jinja2 : None IPython : None pandas_datareader: None bs4 : None bottleneck : None fsspec : None fastparquet : None gcsfs : None matplotlib : None numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pyxlsb : None s3fs : None scipy : 1.7.3 sqlalchemy : 1.4.30 tables : None tabulate : None xarray : 0.20.2 xlrd : None xlwt : None numba : 0.49.1
The text was updated successfully, but these errors were encountered:
this is changed in 1.4.0rc0 pls check
Sorry, something went wrong.
It works for .replace but not for .fillna should I rename the issue instead of opening a new one?
.replace
.fillna
Any idea when 1.4.0 will be released?
shortly
No branches or pull requests
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 replace function uses
None
instead of a sentinel value to check for a missing argument, thus it does not allowNone
to be used.The
fillna
function also has this problem.Expected Behavior
The replace function should allow the usage of
None
as a target value.Installed Versions
INSTALLED VERSIONS
commit : 66e3805
python : 3.8.10.final.0
python-bits : 64
OS : Darwin
OS-release : 20.6.0
Version : Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : en_GB.UTF-8
LOCALE : en_GB.UTF-8
pandas : 1.3.5
numpy : 1.18.5
pytz : 2021.3
dateutil : 2.8.2
pip : 21.3.1
setuptools : 59.8.0
Cython : 0.29.26
pytest : 6.2.5
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : 1.1
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : None
fastparquet : None
gcsfs : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyxlsb : None
s3fs : None
scipy : 1.7.3
sqlalchemy : 1.4.30
tables : None
tabulate : None
xarray : 0.20.2
xlrd : None
xlwt : None
numba : 0.49.1
The text was updated successfully, but these errors were encountered: