Skip to content

BUG: recursion limit on eval when operating on different types #5198

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

Closed
TomAugspurger opened this issue Oct 12, 2013 · 3 comments · Fixed by #6652
Closed

BUG: recursion limit on eval when operating on different types #5198

TomAugspurger opened this issue Oct 12, 2013 · 3 comments · Fixed by #6652
Labels
Milestone

Comments

@TomAugspurger
Copy link
Contributor

Me being dumb discovered this:

In [209]: bug = pd.DataFrame({"A": [1, 2], 'B': ['c', 'd']})

In [210]: bug
Out[210]: 
   A  B
0  1  c
1  2  d

In [211]: bug.eval('A + B')

# stack trace truncated ...

RuntimeError: maximum recursion depth exceeded

cc @cpcloud

@jreback jreback closed this as completed Jan 3, 2014
@jreback jreback reopened this Jan 3, 2014
@cpcloud
Copy link
Member

cpcloud commented Mar 16, 2014

Just now saw this

@cpcloud cpcloud self-assigned this Mar 16, 2014
cpcloud added a commit that referenced this issue Mar 17, 2014
…ype-operations

BUG: disallow mixed dtype operations in eval/query
@ccharlesgb
Copy link
Contributor

Not sure if this deserves a separate issue as this one is very old but I think this is related. After some hypothesis testing on our codebase we noticed this causes a max recursion limit as well:

df = pd.DataFrame(index=list(range(0,1)), columns=list('abc'))
df.eval('a*b')

And:

df = pd.DataFrame(columns=list('abc'))
df.eval('a*b')

INSTALLED VERSIONS


commit : None
python : 3.6.5.final.0
python-bits : 64
OS : Windows
OS-release : 7
machine : AMD64
processor : Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.None
pandas : 0.25.0
numpy : 1.16.4
pytz : 2018.4
dateutil : 2.7.3
pip : 10.0.1
setuptools : 39.1.0
Cython : None
pytest : 3.5.1
hypothesis : None
sphinx : 1.8.2
blosc : None
feather : None
xlsxwriter : 1.0.4
lxml.etree : 4.1.1
html5lib : 1.0.1
pymysql : None
psycopg2 : None
jinja2 : 2.10
IPython : 6.4.0
pandas_datareader: None
bs4 : 4.7.1
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.1.1
matplotlib : 2.2.2
numexpr : 2.6.5
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : 1.1.0
sqlalchemy : 1.2.8
tables : 3.5.2
xarray : None
xlrd : 1.1.0
xlwt : None
xlsxwriter : 1.0.4

@TomAugspurger
Copy link
Contributor Author

@ccharlesgb Probably open a new issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants