pandas.option_context#
- pandas.option_context(*args)[source]#
Context manager to temporarily set options in a
with
statement.- Parameters:
- *argsstr | object
An even amount of arguments provided in pairs which will be interpreted as (pattern, value) pairs.
- Returns:
- None
No return value.
Notes
For all available options, please view the User Guide or use
pandas.describe_option()
.Examples
>>> from pandas import option_context >>> with option_context("display.max_rows", 10, "display.max_columns", 5): ... pass