-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: maximum recursion depth in eval when using bool object #34044
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
Not sure if this helps but try increase the capacity of the stack by the following :
|
Nope, that doesnt help. We are calling and recalling the same stuff here. This definitely needs a fix. |
I have the same problem with pandas==1.0.4, and it's about string object: import pandas as pd
df = pd.DataFrame({'A':list('abc'), 'B':list('def')})
df.eval('A+B') But it works well with pandas==1.0.1. |
Could not reproduce the issue with |
@mutricyl you are correct. It works also with 2.1.3. |
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.
Code Sample, a copy-pastable example
Problem description
"col1" in the example is casted to object bool since in my real example I have nan.
Maybe similar to #27639
Output of
pd.show_versions()
pandas : 1.0.3
numpy : 1.18.1
pytz : 2019.2
dateutil : 2.7.5
pip : 20.1
setuptools : 41.6.0
Cython : 0.29.15
pytest : 4.0.0
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.4.0
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10
IPython : 7.3.0
pandas_datareader: 0.8.0
bs4 : 4.7.1
bottleneck : 1.2.1
fastparquet : None
gcsfs : None
lxml.etree : 4.4.0
matplotlib : 3.1.3
numexpr : 2.7.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : 4.0.0
pyxlsb : None
s3fs : 0.4.2
scipy : 1.2.1
sqlalchemy : None
tables : 3.5.2
tabulate : 0.8.5
xarray : 0.12.1
xlrd : 1.2.0
xlwt : 1.1.2
xlsxwriter : None
numba : 0.48.0
The text was updated successfully, but these errors were encountered: