Evaluate a string describing operations on DataFrame columns.

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.

param expr

The expression string to evaluate.

param inplace
bool, default False

If the expression contains an assignment, whether to perform the operation inplace and mutate the existing DataFrame. Otherwise, a new DataFrame is returned.

New in version 0.18.0..

param kwargs

See the documentation for eval() for complete details on the keyword arguments accepted by query().


ndarray, scalar, or pandas object The result of the evaluation.


This feature is currently unsupported by Intel Scalable Dataframe Compiler