Open
Description
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
with pd.option_context('future.no_silent_downcasting', True):
pd.Series([None]).fillna(False)
Issue Description
I was not able to find a code that doesn't throw warnings for pandas >= 2.0. The example will work in pandas 2.2, but will break for earlier versions. Ahem... This is probably the first time in my Python development that a backwards incompatible change has been issued with a backwards incompatible workaround.
Expected Behavior
Not throw any warning.
i could do something like this
if pandas.__version__ >= '2.2.0':
with pd.option_context('future.no_silent_downcasting', True):
pd.Series([None]).fillna(False)
else:
pd.Series([None]).fillna(False)
I suppose this code would work, but it's a bad code.
Installed Versions
pandas : 2.2.2
numpy : 1.26.3
pytz : 2024.1
dateutil : 2.8.1