Pandas.reset_option() function in Python Last Updated : 28 Jun, 2022 Comments Improve Suggest changes Like Article Like Report 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 : pat : Regexp which should match a single option. Returns : None Example 1 : We will change the value of an option using pandas.get_option(), we will then reset it back to its default value using pandas.reset_option(). Python3 # importing the module import pandas as pd # setting the values pd.set_option("display.max_rows", 10) pd.set_option("display.min_rows", 2) pd.set_option("display.max_columns", 5) pd.set_option("display.html.border", 3) pd.set_option("io.excel.xlsm.reader", "openpyxl") # displaying the values print("The altered values are : ") print("Value of max_rows : " + str(pd.get_option("display.max_rows"))) print("Value of min_rows : " + str(pd.get_option("display.max_columns"))) print("Value of max_columns : " + str(pd.get_option("display.max_columns"))) print("Value of border : " + str(pd.get_option("display.html.border"))) print("Value of xlsm reader : " + str(pd.get_option("io.excel.xlsm.reader"))) # resetting the values to default pd.reset_option("display.max_rows") pd.reset_option("display.min_rows") pd.reset_option("display.max_columns") pd.reset_option("display.html.border") pd.reset_option("io.excel.xlsm.reader") # displaying the default values print("\nThe default values are : ") print("Value of max_rows : " + str(pd.get_option("display.max_rows"))) print("Value of min_rows : " + str(pd.get_option("display.max_columns"))) print("Value of max_columns : " + str(pd.get_option("display.max_columns"))) print("Value of border : " + str(pd.get_option("display.html.border"))) print("Value of xlsm reader : " + str(pd.get_option("io.excel.xlsm.reader"))) Output : Example 2 : Instead of individually resetting the values of different options, we can reset the values of all the options at once by passing "all" as the parameter in the pandas.reset_option() function. Python3 # importing the module import pandas as pd # setting the values pd.set_option("display.max_rows", 10) pd.set_option("display.min_rows", 2) pd.set_option("display.max_columns", 5) pd.set_option("display.html.border", 3) pd.set_option("io.excel.xlsm.reader", "openpyxl") # displaying the values print("The altered values are : ") print("Value of max_rows : " + str(pd.get_option("display.max_rows"))) print("Value of min_rows : " + str(pd.get_option("display.max_columns"))) print("Value of max_columns : " + str(pd.get_option("display.max_columns"))) print("Value of border : " + str(pd.get_option("display.html.border"))) print("Value of xlsm reader : " + str(pd.get_option("io.excel.xlsm.reader"))) # resetting the values to default pd.reset_option("all") # displaying the default values print("\nThe default values are : ") print("Value of max_rows : " + str(pd.get_option("display.max_rows"))) print("Value of min_rows : " + str(pd.get_option("display.max_columns"))) print("Value of max_columns : " + str(pd.get_option("display.max_columns"))) print("Value of border : " + str(pd.get_option("display.html.border"))) print("Value of xlsm reader : " + str(pd.get_option("io.excel.xlsm.reader"))) Output : Comment More infoAdvertise with us Next Article Pandas.reset_option() function in Python Y Yash_R Follow Improve Article Tags : Python Python-pandas Practice Tags : python Similar Reads Pandas.set_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 set the value of a specified option. set_option() Syntax : pandas.set_option(pat, value) Parameters : pat : Regexp which should 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 turtle.reset() function in Python The turtle module provides turtle graphics primitives, in both object-oriented and procedure-oriented ways. Because it uses Tkinter for the underlying graphics, it needs a version of Python installed with Tk support. turtle.reset() This function is used to delete the turtle's drawings and restore it 1 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 Like