-
-
Notifications
You must be signed in to change notification settings - Fork 18.3k
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
Reverse operators on integer-NA series and numpy scalars resulting in object dtype #22024
Comments
I would like to work on a PR. |
go for it! |
…ng in object dtype (pandas-dev#22024)
…ng in object dtype (pandas-dev#22024)
…ng in object dtype (pandas-dev#22024)
…ng in object dtype (pandas-dev#22024)
The issue is resolved by some other PR. In current master it behaves just like expected. @jorisvandenbossche @jreback In [2]: import pandas as pd
In [3]: s = pd.Series([1, 2, 3], dtype='Int64')
In [4]: s[0]
Out[4]: 1
In [5]: s[0] + s
Out[5]:
0 2
1 3
2 4
dtype: Int64
In [6]: s + s[0]
Out[6]:
0 2
1 3
2 4
dtype: Int64 |
lots of work by @jbrockmendel and others in ops likely fixed this |
We have #22974 for testing ops between EA and ndarrays / sequences directly (we just do series right now). So we can close this in favor of the issue for creating a base test. |
This is not necessarily a bug, but at least some unexpected results:
In the above
s[0]
is a numpy scalar, if you do aradd
with a normal int, you do not get object:The text was updated successfully, but these errors were encountered: