-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Allow tan
to be used in df.eval
.
#58334
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
Conversation
While at it, is it feasible to also add other functions? I noticed the functions supported by NumExpr here, such as conj, real, imag. |
Probably, but I'd prefer to keep this PR as is, since this is pure straight-forward fix. |
@@ -45,6 +45,7 @@ | |||
_unary_math_ops = ( | |||
"sin", | |||
"cos", | |||
"tan", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just by adding "tan" to the list _unary_math_ops
a standard test (which is applied to all these functions) is automatically added:
pandas/pandas/tests/computation/test_eval.py
Line 1615 in 454e2e1
@pytest.mark.parametrize("fn", _unary_math_ops) |
Let me know if you meant anything more specific.
Thanks @domsmrz |
* Allow `tan` to be used in `df.eval`. * Whatsnew: Link issue for fixing `tan` in `eval`.
* Allow `tan` to be used in `df.eval`. * Whatsnew: Link issue for fixing `tan` in `eval`.
_unary_math_ops
.Added type annotations to new arguments/methods/functions.doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.