Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/core/computation/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ def eval(

.. warning::

``eval`` can run arbitrary code which can make you vulnerable to code
injection and untrusted data.
This function can run arbitrary code which can make you vulnerable to code
injection if you pass user input to this function.

Parameters
----------
Expand Down
11 changes: 9 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4476,8 +4476,10 @@ def query(self, expr: str, *, inplace: bool = False, **kwargs) -> DataFrame | No
"""
Query the columns of a DataFrame with a boolean expression.

This method can run arbitrary code which can make you vulnerable to code
injection if you pass user input to this function.
.. warning::

This method can run arbitrary code which can make you vulnerable to code
injection if you pass user input to this function.

Parameters
----------
Expand Down Expand Up @@ -4634,6 +4636,11 @@ def eval(self, expr: str, *, inplace: bool = False, **kwargs) -> Any | None:
"""
Evaluate a string describing operations on DataFrame columns.

.. warning::

This method can run arbitrary code which can make you vulnerable to code
injection if you pass user input to this function.

Operates on columns only, not specific rows or elements. This allows
`eval` to run arbitrary code, which can make you vulnerable to code
injection if you pass user input to this function.
Expand Down
Loading