-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
Missing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Description
In [1]: import pandas as pd; from io import StringIO; import numpy as np
In [2]: pd.__version__
Out[2]: '2.1.4'
In [3]: ser = pd.Series(pd.array([1, pd.NA], dtype="Float64"))
In [4]: ser.eq(np.nan, fill_value=0.0). # 2.1.4
Out[4]:
0 False
1 False
dtype: boolean
In [4]: ser.eq(np.nan, fill_value=0.0). # 2.2
Out[4]:
0 False
1 <NA>
dtype: boolean
I would expect fill_value
to replace NA with 0.0 before comparing with np.nan
as described in the docs
Metadata
Metadata
Assignees
Labels
Missing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNA - MaskedArraysRelated to pd.NA and nullable extension arraysRelated to pd.NA and nullable extension arraysNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations