-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: Weird behavior for comparison operations eq
and ne
#36377
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
Comments
Also, an exception is changing for comparison operations |
hi @YarShev , so from what I know, the problem seems came from numpy. They have some issues when try to compare different datatype, so the quick solution to this problem by add about size problem, I'm not quite sure, but I tried to loop |
Hi @satrio-hw , perhaps, the problem comes from |
@YarShev I tried to compare pandas v1.0.x and the current master.. I can't find significant difference in function I also think this issue is not related to size of operands, since Error rise from I think I could make a PR in pandas/core/computation/expressions.py to handle this particular dtype problem, but I don't think it's a best practice since it could effect other function in this project and also by change DataFrame dtype ( |
@satrio-hw , thanks for significant description! Yes, I think just change |
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
(optional) I have confirmed this bug exists on the master branch of pandas.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Code Sample, a copy-pastable example
Problem description
Looks like the problem is related to size of operands for comparison operations. Could anyone explain please? Is it normal behavior?
Output of
pd.show_versions()
pandas : 1.1.2
numpy : 1.18.4
pytz : 2020.1
dateutil : 2.8.1
pip : 20.1.1
setuptools : 41.2.0
Cython : None
pytest : 5.4.2
hypothesis : None
sphinx : None
blosc : None
feather : 0.4.1
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.14.0
pandas_datareader: None
bs4 : 4.9.1
bottleneck : None
fsspec : 0.7.3
fastparquet : None
gcsfs : None
matplotlib : 3.2.1
numexpr : 2.7.1
odfpy : None
openpyxl : 3.0.3
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
pyxlsb : None
s3fs : 0.4.2
scipy : 1.4.1
sqlalchemy : 1.3.17
tables : 3.6.1
tabulate : None
xarray : 0.15.1
xlrd : 1.2.0
xlwt : None
numba : None
The text was updated successfully, but these errors were encountered: