Skip to content

Commit 0320b3c

Browse files
eilonc-cxmroeschke
andauthored
DOC: Update warning message in pandas.eval function (pandas-dev#59108)
* Update warning message in pandas.eval function Modify warning to indicate the risks using eval func. * Update pandas.eval function warning message - fix Docstring * Update pandas/core/computation/eval.py Co-authored-by: Matthew Roeschke <[email protected]> * Update pandas/core/computation/eval.py --------- Co-authored-by: Matthew Roeschke <[email protected]>
1 parent 10d3615 commit 0320b3c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/core/computation/eval.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,11 @@ def eval(
193193
corresponding bitwise operators. :class:`~pandas.Series` and
194194
:class:`~pandas.DataFrame` objects are supported and behave as they would
195195
with plain ol' Python evaluation.
196-
`eval` can run arbitrary code which can make you vulnerable to code
197-
injection if you pass user input to this function.
196+
197+
.. warning::
198+
199+
``eval`` can run arbitrary code which can make you vulnerable to code
200+
injection and untrusted data.
198201
199202
Parameters
200203
----------

0 commit comments

Comments
 (0)