Skip to content

Expressions don't evaluate when using named parameters #22172

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
paulalexwilson opened this issue Aug 2, 2018 · 2 comments
Closed

Expressions don't evaluate when using named parameters #22172

paulalexwilson opened this issue Aug 2, 2018 · 2 comments

Comments

@paulalexwilson
Copy link

It seems that the eval function doesn't work when using named parameters:

    >>> import pandas.core.computation.eval as eval
    >>> def func(a=None): return a*a
    ... 
    >>> eval.eval('func(a=2)')
    /expr.py", line 314, in visit
    return visitor(node, **kwargs)
    File "python3.6/site-packages/pandas/core/computation/expr.py", line 581, in visit_Call_35
    kwargs.append(ast.keyword(
    AttributeError: 'dict' object has no attribute 'append'

Looks like some neglected code in expr.py.

@jreback
Copy link
Contributor

jreback commented Aug 2, 2018

this is not supported, though you are welcome to submit a PR

@jreback jreback closed this as completed Aug 2, 2018
@jreback
Copy link
Contributor

jreback commented Aug 2, 2018

if you search for eval in github you will see that many such things are simply not implemented.

@jreback jreback added this to the No action milestone Aug 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants