pandas.get_option — pandas 3.0.0.dev0+2097.gcdc5b7418e documentation (original) (raw)
pandas.get_option(pat)[source]#
Retrieve the value of the specified option.
This method allows users to query the current value of a given option in the pandas configuration system. Options control various display, performance, and behavior-related settings within pandas.
Parameters:
patstr
Regexp which should match a single option.
Warning
Partial matches are supported for convenience, but unless you use the full option name (e.g. x.y.z.option_name), your code may break in future versions if new options with similar names are introduced.
Returns:
Any
The value of the option.
Raises:
OptionErrorif no such option exists
See also
Set the value of the specified option or options.
Reset one or more options to their default value.
Print the description for one or more registered options.
Notes
For all available options, please view the User Guideor use pandas.describe_option()
.
Examples
pd.get_option("display.max_columns")
4