-
-
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
Series bool ops testing needs fleshing out #19792
Comments
not real clear what u r asking here - can u show an example |
TL;DR: it is not clear what the pandas convention is for the desired behavior of these operations with dtypes including timedelta64/datetime64/datetime64[tz]/categorical/[extension?] In some cases these ops are bool-like and in others they are bit-like, see how
The error-catching in the nested function (https://github.com/pandas-dev/pandas/blob/master/pandas/core/ops.py#L1063) is about patching numpy's conventions with pandas conventions:
AFAICT this was written without datetime64/datetime64[tz]/timedelta64/categorical being taken into account, so it is not obvious what the desired behavior is for these other dtypes. |
The main important piece here is the dt64/td64, so closing in favor of #19759 |
Looks like it's almost all in tests.series.test_operators.test_operators_bitwise
In particular, op(series, index) will always raise for op in [&, |, ^]. (Presumably also op(series, categorical), but I haven't looked at that closely.) I can fix this and add some basic tests for it, but the dtype logic in
ops._bool_method_SERIES
doesn't make entirely clear what the desired behavior is, so some input will be needed to flesh them out more thoroughly.The text was updated successfully, but these errors were encountered: