VOOZH about

URL: https://www.geeksforgeeks.org/python/pandas-set_option-function-in-python/

⇱ Pandas.set_option() function in Python - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Pandas.set_option() function in Python

Last Updated : 28 Jul, 2020
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. Output : 👁 Image
Example 2 : Changing the number of columns to be displayed using display.max_columns.
Output : 👁 Image
Comment
Article Tags:
Article Tags: