-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Multiline pd.eval() seems to be broken #31952
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
What do you mean by "broken" - did the example you provided used to work in previous versions? It looks like you're trying to pass multiple expressions to Finally, even with a single line, I don't believe this example would work: [EDIT: with
Perhaps you meant
? (even then, only a single expression is allowed) (EDIT: I wasn't quite right about this: only a single expression is allowed, but that expression may contain multiple lines, but only in |
Hi Marco, |
Thanks @resposit - are you referring to the "Multiline Queries and Assignment" section? If so, the command they give is a bit different (they're using
|
Hi @MarcoGorelli
I'm instead interested in using pd.eval() which, in principal, should also support multiline assignements. |
OK, yes - if
works, there's no reason why
(which is what you originally wrote - apologies) shouldn't. Looking at the source code, I don't know if the fact that it doesn't is intentional,
which suggests that, if target isn't |
Code Sample:
Problem description
Expected Output
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.6.8.final.0
python-bits : 64
OS : Linux
OS-release : 3.10.0-1062.9.1.el7.x86_64
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.1
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.0
pip : 9.0.3
setuptools : 45.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.12.0
pandas_datareader: None
bs4 : 4.8.2
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.1.2
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
pytest : None
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: