-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
BUG: eval fails for ExtensionArray #58748
Labels
Comments
mutricyl
added
Bug
Needs Triage
Issue that has not been reviewed by a pandas team member
labels
May 17, 2024
Thanks for the report! Further investigations and PRs to fix are welcome. |
rhshadrach
added
ExtensionArray
Extending pandas with custom dtypes or arrays.
expressions
pd.eval, query
and removed
Needs Triage
Issue that has not been reviewed by a pandas team member
labels
May 19, 2024
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
May 19, 2024
5 tasks
Hey @mutricyl @rhshadrach , thank you for mentioning the issue properly and in detailed manner. I have looked into it and have issued a PR as well, do check if any issues in the PR let me know I will work on it, Thanks once again. Cheers |
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
May 21, 2024
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
May 21, 2024
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
May 22, 2024
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
May 22, 2024
mutricyl
pushed a commit
to mutricyl/pandas
that referenced
this issue
May 24, 2024
mutricyl
pushed a commit
to mutricyl/pandas
that referenced
this issue
May 24, 2024
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
May 28, 2024
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
May 28, 2024
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
Jun 8, 2024
SiddheshBangar
added a commit
to SiddheshBangar/pandas
that referenced
this issue
Jun 8, 2024
mutricyl
pushed a commit
to mutricyl/pandas
that referenced
this issue
Jun 28, 2024
mroeschke
added a commit
that referenced
this issue
Jul 1, 2024
* remove core.computation.ops.Div resolves #21374 #58748 * need to preserve order * updating tests * update whatsnew * solve mypy issue * fixing pytests * better than cast * adding specific test * Update pandas/tests/frame/test_query_eval.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * Update pandas/tests/computation/test_eval.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --------- Co-authored-by: Laurent Mutricy <laurent.mutricy@ekium.eu> Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
bnavigator
added a commit
to bnavigator/pandas
that referenced
this issue
Aug 17, 2024
…olve pandas-dev#2137) * remove core.computation.ops.Div resolves pandas-dev#21374 pandas-dev#58748 * need to preserve order * updating tests * (update whatsnew -- no whatsnew for 2.2.x and 2.3 yet) * solve mypy issue * fixing pytests * better than cast * adding specific test (* Update pandas/tests/frame/test_query_eval.py // Not backported, fails on 2.2) Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * Update pandas/tests/computation/test_eval.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --------- Co-authored-by: Laurent Mutricy <laurent.mutricy@ekium.eu> Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
5 tasks
bnavigator
added a commit
to bnavigator/pandas
that referenced
this issue
Aug 17, 2024
…olve pandas-dev#2137) * remove core.computation.ops.Div resolves pandas-dev#21374 pandas-dev#58748 * need to preserve order * updating tests * (update whatsnew -- no whatsnew for 2.2.x and 2.3 yet) * solve mypy issue * fixing pytests * better than cast * adding specific test (* Update pandas/tests/frame/test_query_eval.py // Not backported, fails on 2.2) Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * Update pandas/tests/computation/test_eval.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --------- Co-authored-by: Laurent Mutricy <laurent.mutricy@ekium.eu> Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
WillAyd
added a commit
to WillAyd/pandas
that referenced
this issue
Aug 27, 2024
* remove core.computation.ops.Div resolves pandas-dev#21374 pandas-dev#58748 * need to preserve order * updating tests * update whatsnew * solve mypy issue * fixing pytests * better than cast * adding specific test * Update pandas/tests/frame/test_query_eval.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> * Update pandas/tests/computation/test_eval.py Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> --------- Co-authored-by: Laurent Mutricy <laurent.mutricy@ekium.eu> Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
lithomas1
added a commit
that referenced
this issue
Sep 18, 2024
#59535) * remove core.computation.ops.Div resolves #21374 #58748 * need to preserve order * updating tests * (update whatsnew -- no whatsnew for 2.2.x and 2.3 yet) * solve mypy issue * fixing pytests * better than cast * adding specific test (* Update pandas/tests/frame/test_query_eval.py // Not backported, fails on 2.2) * Update pandas/tests/computation/test_eval.py --------- Co-authored-by: Laurent Mutricy <laurent.mutricy@ekium.eu> Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com> Co-authored-by: Thomas Li <47963215+lithomas1@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
This issue is coming from pint-pandas#137.
ExtensionArray
is used for this project anddf.eval
inlcuding division (\
) fails withTypeError
.I was able to able to reproduce the pint-pandas issue with pandas build in
IntegerArray
as shown in the above exampleLooking at the traceback it seams that
pandas\core\computation\ops.isnumeric()
does not handle properly dtypes fromExtensionArray
class (or subclass). It was suggested to consider_is_numeric
class attribute.probably linked to #21374
Expected Behavior
df.eval('a / b')
should give the same result thandf['a'] / df['b']
Installed Versions
INSTALLED VERSIONS
commit : 4fb94bb
python : 3.11.4.final.0
python-bits : 64
OS : Windows
OS-release : 10
Version : 10.0.19045
machine : AMD64
processor : Intel64 Family 6 Model 186 Stepping 2, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : fr_FR.cp1252
pandas : 3.0.0.dev0+983.g4fb94bb09a
numpy : 1.26.4
pytz : 2024.1
dateutil : 2.8.2
setuptools : 67.8.0
pip : 23.1.2
Cython : None
pytest : 8.2.0
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : 3.8.3
numba : None
numexpr : 2.10.0
odfpy : None
openpyxl : 3.1.2
pyarrow : 15.0.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : 1.12.0
sqlalchemy : None
tables : None
tabulate : 0.9.0
xarray : 2024.2.0
xlrd : None
zstandard : 0.19.0
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: