From 14524d1a85c75c2f51a01cf34c8aac52e55ea9c3 Mon Sep 17 00:00:00 2001 From: zacharym-collins Date: Tue, 16 Dec 2025 08:03:40 -0600 Subject: [PATCH 1/2] DOC: Fix default value for engine in pandas.eval Update docstring to match signature default of None. Also clarify description of numexpr engine. --- pandas/core/computation/eval.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandas/core/computation/eval.py b/pandas/core/computation/eval.py index a15d3dc86c841..4ac13d0975bdb 100644 --- a/pandas/core/computation/eval.py +++ b/pandas/core/computation/eval.py @@ -238,12 +238,12 @@ def eval( ``'python'`` parser to retain strict Python semantics. See the :ref:`enhancing performance ` documentation for more details. - engine : {'python', 'numexpr'}, default 'numexpr' + engine : {'python', 'numexpr'}, optional, default None The engine used to evaluate the expression. Supported engines are - None : tries to use ``numexpr``, falls back to ``python`` - - ``'numexpr'`` : This default engine evaluates pandas objects using + - ``'numexpr'`` : Evaluates pandas objects using numexpr for large speed ups in complex expressions with large frames. - ``'python'`` : Performs operations as if you had ``eval``'d in top level python. This engine is generally not that useful. From 34e5c84454dc4ddb4f18de6af4adcdae93b6aafd Mon Sep 17 00:00:00 2001 From: zacharym-collins Date: Tue, 16 Dec 2025 09:13:08 -0600 Subject: [PATCH 2/2] DOC: Clarify numexpr is the default engine when installed. --- pandas/core/computation/eval.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/computation/eval.py b/pandas/core/computation/eval.py index 4ac13d0975bdb..226bea6631a46 100644 --- a/pandas/core/computation/eval.py +++ b/pandas/core/computation/eval.py @@ -243,8 +243,9 @@ def eval( The engine used to evaluate the expression. Supported engines are - None : tries to use ``numexpr``, falls back to ``python`` - - ``'numexpr'`` : Evaluates pandas objects using - numexpr for large speed ups in complex expressions with large frames. + - ``'numexpr'`` : This is the default engine when ``numexpr`` is installed. + Evaluates pandas objects using numexpr for large speed ups in complex + expressions with large frames. - ``'python'`` : Performs operations as if you had ``eval``'d in top level python. This engine is generally not that useful.