Skip to content

Conversation

@zacharym-collins
Copy link
Contributor

@zacharym-collins zacharym-collins commented Dec 16, 2025

Update docstring to match signature default of None. Also clarify description of numexpr engine.

Description

Updates the docstring for the engine parameter in pandas.eval (located in pandas/core/computation/eval.py) to reflect that the default value in the function signature is None.

Previously documented as default 'numexpr', it has been corrected to optional, default None to match the signature engine: str | None = None.

The description for the 'numexpr' engine was also updated to remove the phrase "This default engine" to avoid contradiction with the new parameter description.

Validation

Ran the docstring validation script locally:
python scripts/validate_docstrings.py pandas.eval

Update docstring to match signature default of None. Also clarify description of numexpr engine.
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is important to still indicate that "numexpr" is the default engine when installed

@zacharym-collins
Copy link
Contributor Author

Thanks for the review. I've updated the docstring to explicitly state that numexpr is the default engine when installed, while keeping the parameter signature as default None. Ready for another look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOC: the default value of engine argument in eval should be None

2 participants