reset_option()

We can read display option values and update to different values by using get_option() and set_option()
reset_option()reset one or more option to default value
We can get a list of available options by using describe_option(). These option values we can manage by using set_option() & get_option().

We can reset one option value or reset all the options.

max_rows

By default the value of display option max_rows is 60. We will set this value to 6. After changing the value we can reset this value to its default value by using reset_option().
Let us read our student excel file ( you can download and use ) having 35 rows of data and display the rows after using reset_option()
import pandas as pd 
my_data = pd.read_excel('D:\student.xlsx',index_col='id')
pd.set_option("display.max_rows",6)
print(pd.get_option("display.max_rows")) # 6
pd.reset_option("display.max_rows")
print(my_data)
We will display all 35 rows of data ( not 6 ) as we have used reset_otpion() to restore the default value of max_rows to 60.

Resetting all the display options

pd.reset_option("display")
This will reset all the option values to its default value.

Like this there are several options available and we can update the values of these function. A list of such options with detail description is available by using describe_option()
All display option functions of DataFrame

Pandas read_csv() read_excel() to_excel()
Subhendu Mohapatra — author at plus2net
Subhendu Mohapatra

Author

🎥 Join me live on YouTube

Passionate about coding and teaching, I publish practical tutorials on PHP, Python, JavaScript, SQL, and web development. My goal is to make learning simple, engaging, and project‑oriented with real examples and source code.



Subscribe to our YouTube Channel here



plus2net.com







Python Video Tutorials
Python SQLite Video Tutorials
Python MySQL Video Tutorials
Python Tkinter Video Tutorials
We use cookies to improve your browsing experience. . Learn more
HTML MySQL PHP JavaScript ASP Photoshop Articles Contact us
©2000-2025   plus2net.com   All rights reserved worldwide Privacy Policy Disclaimer