Skip to main content

__ Back to top

__ ` Ctrl ` \+ ` K `

[ ![pandas 2.2.1 documentation - Home](../_static/pandas.svg) ](../index.html)

Site Navigation

  * [ Getting started ](../getting_started/index.html)
  * [ User Guide ](index.html)
  * [ API reference ](../reference/index.html)
  * [ Development ](../development/index.html)
  * [ Release notes ](../whatsnew/index.html)

  * [ __ GitHub  ](https://github.com/pandas-dev/pandas "GitHub")
  * [ __ Twitter  ](https://twitter.com/pandas_dev "Twitter")
  * [ __ Mastodon  ](https://fosstodon.org/@pandas_dev "Mastodon")

Site Navigation

  * [ Getting started ](../getting_started/index.html)
  * [ User Guide ](index.html)
  * [ API reference ](../reference/index.html)
  * [ Development ](../development/index.html)
  * [ Release notes ](../whatsnew/index.html)

  * [ __ GitHub  ](https://github.com/pandas-dev/pandas "GitHub")
  * [ __ Twitter  ](https://twitter.com/pandas_dev "Twitter")
  * [ __ Mastodon  ](https://fosstodon.org/@pandas_dev "Mastodon")

  * [ 10 minutes to pandas ](10min.html)
  * [ Intro to data structures ](dsintro.html)
  * [ Essential basic functionality ](basics.html)
  * [ IO tools (text, CSV, HDF5, â¦) ](io.html)
  * [ PyArrow Functionality ](pyarrow.html)
  * [ Indexing and selecting data ](indexing.html)
  * [ MultiIndex / advanced indexing ](advanced.html)
  * [ Copy-on-Write (CoW) ](copy_on_write.html)
  * [ Merge, join, concatenate and compare ](merging.html)
  * [ Reshaping and pivot tables ](reshaping.html)
  * [ Working with text data ](text.html)
  * [ Working with missing data ](missing_data.html)
  * [ Duplicate Labels ](duplicates.html)
  * [ Categorical data ](categorical.html)
  * [ Nullable integer data type ](integer_na.html)
  * [ Nullable Boolean data type ](boolean.html)
  * [ Chart visualization ](visualization.html)
  * [ Table Visualization ](style.html)
  * [ Group by: split-apply-combine ](groupby.html)
  * [ Windowing operations ](window.html)
  * [ Time series / date functionality ](timeseries.html)
  * [ Time deltas ](timedeltas.html)
  * Options and settings 
  * [ Enhancing performance ](enhancingperf.html)
  * [ Scaling to large datasets ](scale.html)
  * [ Sparse data structures ](sparse.html)
  * [ Frequently Asked Questions (FAQ) ](gotchas.html)
  * [ Cookbook ](cookbook.html)

  * [ __ ](../index.html)
  * [ User Guide ](index.html)
  * Options and settings 

#  Options and settings  #

##  Overview  #

pandas has an options API configure and customize global behavior related to [
` DataFrame  ` ](../reference/api/pandas.DataFrame.html#pandas.DataFrame
"pandas.DataFrame") display, data behavior and more.

Options have a full âdotted-styleâ, case-insensitive name (e.g. `
display.max_rows  ` ). You can get/set options directly as attributes of the
top-level ` options  ` attribute:

    
    
    In [1]: import pandas as pd
    
    In [2]: pd.options.display.max_rows
    Out[2]: 15
    
    In [3]: pd.options.display.max_rows = 999
    
    In [4]: pd.options.display.max_rows
    Out[4]: 999
    

The API is composed of 5 relevant functions, available directly from the `
pandas  ` namespace:

  * [ ` get_option()  ` ](../reference/api/pandas.get_option.html#pandas.get_option "pandas.get_option") / [ ` set_option()  ` ](../reference/api/pandas.set_option.html#pandas.set_option "pandas.set_option") \- get/set the value of a single option. 

  * [ ` reset_option()  ` ](../reference/api/pandas.reset_option.html#pandas.reset_option "pandas.reset_option") \- reset one or more options to their default value. 

  * [ ` describe_option()  ` ](../reference/api/pandas.describe_option.html#pandas.describe_option "pandas.describe_option") \- print the descriptions of one or more options. 

  * [ ` option_context()  ` ](../reference/api/pandas.option_context.html#pandas.option_context "pandas.option_context") \- execute a codeblock with a set of options that revert to prior settings after execution. 

Note

Developers can check o