-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorBugDataFrameDataFrame data structureDataFrame data structureMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Description
Based on test_bool_ops_df_compat
from tests.series.test_operators
:
s1 = pd.Series([True, False, np.nan, True], dtype=object)
s2 = pd.Series([True, True, False, np.nan], dtype=object)
>>> s1 & s2
0 True
1 False
2 False
3 False
dtype: bool
>>> s1.to_frame() & s2.to_frame()
0
0 True
1 False
2 NaN
3 NaN
The DataFrame behavior strikes me as More Correct. Is the mismatch intentional?
Metadata
Metadata
Assignees
Labels
API - ConsistencyInternal Consistency of API/BehaviorInternal Consistency of API/BehaviorBugDataFrameDataFrame data structureDataFrame data structureMissing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations