-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: fillna() doesn't work with value=None
without method specified, but method is deprecated
#57723
New issue
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
Comments
I believe this issue existed prior to the deprecation: it was never possible to just |
Ref: #47639 |
So should we update the docs now to reflect that |
I would vote no, but not opposed if someone wants to do that. This deficiency in the docs has existed for a long time, and I expect it to work come 3.0, so it doesn't seem worth the effort to change now. |
agree with @rhshadrach |
I have a PR in the works for enforcing said deprecation, I'll add a test for this and use that PR to close this issue. |
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
method
parameter is deprecated in version 2.1. But the docs forSeries.fillna()
indicate that a value ofNone
is valid. So you can't do afillna()
with a value ofNone
Expected Behavior
Unclear. Do we want to allow
None
as the possible value in fillna()? This could be a docs issue or a code issue.Installed Versions
INSTALLED VERSIONS
commit : fd3f571
python : 3.10.13.final.0
python-bits : 64
OS : Linux
OS-release : 4.4.0-19041-Microsoft
Version : #3996-Microsoft Thu Jan 18 16:36:00 PST 2024
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : C.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.2.0
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.8.2
setuptools : 69.1.0
pip : 23.2.1
Cython : None
pytest : 8.0.1
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: