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
The same as #13806, but for discuss differences with DataFrame.
DataFrame
pd.Series([True, False, np.nan]) | pd.Series([True, False, True]) #0 True #1 False #2 False # dtype: bool pd.Series([True, False, True]) | pd.Series([True, False, np.nan]) #0 True #1 False #2 True # dtype: bool pd.DataFrame([True, False, np.nan]) | pd.DataFrame([True, False, True]) # 0 #0 True #1 False #2 NaN pd.DataFrame([True, False, True]) | pd.DataFrame([True, False, np.nan]) # 0 #0 True #1 False #2 NaN
There looks to be 2 points:
NaN
As @TomAugspurger described in #13806, the basic rule is below. Based on this, DataFrame result is incorrect.
In [40]: float('nan') or 1 Out[40]: nan In [41]: 1 or float('nan') Out[41]: 1
Series fills NaN included in the result with False. DataFrame should also?
Series
False
The text was updated successfully, but these errors were encountered:
This looks fixed on master. Could use a test:
In [96]: pd.Series([True, False, np.nan]) | pd.Series([True, False, True]) ...: Out[96]: 0 True 1 False 2 False dtype: bool In [97]: pd.Series([True, False, True]) | pd.Series([True, False, np.nan]) ...: Out[97]: 0 True 1 False 2 True dtype: bool In [98]: pd.DataFrame([True, False, np.nan]) | pd.DataFrame([True, False, True]) ...: Out[98]: 0 0 True 1 False 2 False In [99]: pd.DataFrame([True, False, True]) | pd.DataFrame([True, False, np.nan]) ...: Out[99]: 0 0 True 1 False 2 True In [100]: pd.__version__ Out[100]: '0.26.0.dev0+593.g9d45934af'
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The same as #13806, but for discuss differences with
DataFrame
.There looks to be 2 points:
1.
NaN
comparison resultAs @TomAugspurger described in #13806, the basic rule is below. Based on this,
DataFrame
result is incorrect.2. filling
NaN
resultSeries
fillsNaN
included in the result withFalse
.DataFrame
should also?The text was updated successfully, but these errors were encountered: