Skip to content

Commit cf953da

Browse files
authored
Allow tan to be used in df.eval. (#58334)
* Allow `tan` to be used in `df.eval`. * Whatsnew: Link issue for fixing `tan` in `eval`.
1 parent 454e2e1 commit cf953da

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

doc/source/whatsnew/v3.0.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,7 @@ Other
458458
- Bug in :class:`DataFrame` when passing a ``dict`` with a NA scalar and ``columns`` that would always return ``np.nan`` (:issue:`57205`)
459459
- Bug in :func:`unique` on :class:`Index` not always returning :class:`Index` (:issue:`57043`)
460460
- Bug in :meth:`DataFrame.eval` and :meth:`DataFrame.query` which caused an exception when using NumPy attributes via ``@`` notation, e.g., ``df.eval("@np.floor(a)")``. (:issue:`58041`)
461+
- Bug in :meth:`DataFrame.eval` and :meth:`DataFrame.query` which did not allow to use ``tan`` function. (:issue:`55091`)
461462
- Bug in :meth:`DataFrame.sort_index` when passing ``axis="columns"`` and ``ignore_index=True`` and ``ascending=False`` not returning a :class:`RangeIndex` columns (:issue:`57293`)
462463
- Bug in :meth:`DataFrame.transform` that was returning the wrong order unless the index was monotonically increasing. (:issue:`57069`)
463464
- Bug in :meth:`DataFrame.where` where using a non-bool type array in the function would return a ``ValueError`` instead of a ``TypeError`` (:issue:`56330`)

pandas/core/computation/ops.py

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
_unary_math_ops = (
4646
"sin",
4747
"cos",
48+
"tan",
4849
"exp",
4950
"log",
5051
"expm1",

0 commit comments

Comments
 (0)