diff --git a/pandas/_config/config.py b/pandas/_config/config.py index 8d1f61178830f..ce53e05608ba7 100644 --- a/pandas/_config/config.py +++ b/pandas/_config/config.py @@ -433,6 +433,11 @@ def option_context(*args) -> Generator[None]: """ Context manager to temporarily set options in a ``with`` statement. + This method allows users to set one or more pandas options temporarily + within a controlled block. The previous options' values are restored + once the block is exited. This is useful when making temporary adjustments + to pandas' behavior without affecting the global state. + Parameters ---------- *args : str | object