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 ---------- pat :
(pat: str)
| 141 | |
| 142 | |
| 143 | def get_option(pat: str) -> Any: |
| 144 | """ |
| 145 | Retrieve the value of the specified option. |
| 146 | |
| 147 | This method allows users to query the current value of a given option |
| 148 | in the pandas configuration system. Options control various display, |
| 149 | performance, and behavior-related settings within pandas. |
| 150 | |
| 151 | Parameters |
| 152 | ---------- |
| 153 | pat : str |
| 154 | Regexp which should match a single option. |
| 155 | |
| 156 | .. warning:: |
| 157 | |
| 158 | Partial matches are supported for convenience, but unless you use the |
| 159 | full option name (e.g. x.y.z.option_name), your code may break in future |
| 160 | versions if new options with similar names are introduced. |
| 161 | |
| 162 | Returns |
| 163 | ------- |
| 164 | Any |
| 165 | The value of the option. |
| 166 | |
| 167 | Raises |
| 168 | ------ |
| 169 | OptionError : if no such option exists |
| 170 | |
| 171 | See Also |
| 172 | -------- |
| 173 | set_option : Set the value of the specified option or options. |
| 174 | reset_option : Reset one or more options to their default value. |
| 175 | describe_option : Print the description for one or more registered options. |
| 176 | |
| 177 | Notes |
| 178 | ----- |
| 179 | For all available options, please view the :ref:`User Guide <options.available>` |
| 180 | or use ``pandas.describe_option()``. |
| 181 | |
| 182 | Examples |
| 183 | -------- |
| 184 | >>> pd.get_option("display.max_columns") # doctest: +SKIP |
| 185 | 4 |
| 186 | """ |
| 187 | key = _get_single_key(pat) |
| 188 | |
| 189 | # walk the nested dict |
| 190 | root, k = _get_root(key) |
| 191 | return root[k] |
| 192 | |
| 193 | |
| 194 | def set_option(*args) -> None: |