Pandas.set_option() function in Python Last Updated : 28 Jul, 2020 Comments Improve Suggest changes Like Article Like Report Pandas have an options system that lets you customize some aspects of its behavior, display-related options being those the user is most likely to adjust. Let us see how to set the value of a specified option. set_option() Syntax : pandas.set_option(pat, value) Parameters : pat : Regexp which should match a single option. value : New value of option. Returns : None Raises : OptionError if no such option exists Example 1 : Changing the number of rows to be displayed using display.max_rows. Python3 1== # importing the module import pandas as pd # creating the DataFrame data = {"Number" : [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "Alphabet" : ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J']} df = pd.DataFrame(data) print("Initial max_rows value : " + str(pd.options.display.max_rows)) # displaying the DataFrame display(df) # changing the max_rows value pd.set_option("display.max_rows", 5) print("max_rows value after the change : " + str(pd.options.display.max_rows)) # displaying the DataFrame display(df) Output : Example 2 : Changing the number of columns to be displayed using display.max_columns. Python3 1== # importing the module import pandas as pd # creating the DataFrame data = {"Number" : 1, "Name" : ["ABC"], "Subject" : ["Computer"], "Field" : ["BDA"], "Marks" : 70} df = pd.DataFrame(data) print("Initial max_columns value : " + str(pd.options.display.max_columns)) # displaying the DataFrame display(df) # changing the max_columns value pd.set_option("display.max_columns", 3) print("max_columns value after the change : " + str(pd.options.display.max_columns)) # displaying the DataFrame display(df) Output : Comment More infoAdvertise with us Next Article Pandas.set_option() function in Python Y Yash_R Follow Improve Article Tags : Python Python-pandas Practice Tags : python Similar Reads Pandas.reset_option() function in Python Pandas have an options system that lets us customize some aspects of its behavior, display-related options being those the user is most likely to adjust. Let us see how to reset the value of a specified option back to its default value. reset_option() Syntax : pandas.reset_option(pat) Parameters : 2 min read Pandas.get_option() function in Python Pandas have an options system that lets you customize some aspects of its behavior, display-related options being those the user is most likely to adjust. Let us see how to see the value of a specified option. get_option() Syntax : pandas.get_option(pat)Parameters : pat : Regexp which should match 2 min read Pandas.describe_option() function in Python Pandas has an options system that lets you customize some aspects of its behavior, display-related options being those the user is most likely to adjust. Let us see how to see the description of a specified option. describe_option()  Syntax : pandas.describe_option(pat, _print_desc = False)Paramet 1 min read Matplotlib.pyplot.setp() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. Pyplot is a state-based interface to a Matplotlib module which provides a MATLAB-like interface. There are various plots which can be used in Pyplot are Line Plot, Contour, Histogram, Scatter, 3D Plot, 2 min read How to Pass Optional Parameters to a Function in Python In Python, functions can have optional parameters by assigning default values to some arguments. This allows users to call the function with or without those parameters, making the function more flexible. When an optional parameter is not provided, Python uses its default value. There are two primar 5 min read Matplotlib.axis.Axis.set_pickradius() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_pickradius() Function The Axis.set_pickradius() functi 2 min read Matplotlib.axis.Axis.set() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set() Function The Axis.set() function in axis module of m 2 min read Matplotlib.axis.Tick.set() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. matplotlib.axis.Tick.set() Function The Tick.set() function in axis module of m 2 min read Matplotlib.axis.Tick.set_picker() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Tick.set_picker() Function The Tick.set_picker() function in ax 2 min read Matplotlib.axis.Axis.set_picker() function in Python Matplotlib is a library in Python and it is numerical â mathematical extension for NumPy library. It is an amazing visualization library in Python for 2D plots of arrays and used for working with the broader SciPy stack. Matplotlib.axis.Axis.set_picker() Function The Axis.set_picker() function in ax 2 min read Like