pandas.get_option#

pandas.get_option(pat)[source]#

Retrieve the value of the specified option.

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_option

Set the value of the specified option or options.

reset_option

Reset one or more options to their default value.

describe_option

Print the description for one or more registered options.

Notes

For all available options, please view the User Guide or use pandas.describe_option().

Examples

>>> pd.get_option("display.max_columns")  
4