Sunday, November 17, 2024
Google search engine
HomeLanguagesPandas.describe_option() function in Python

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)
Parameters : 
 

  • pat : Regexp which should match a single option.
  • _print_desc : If True (default) the description(s) will be printed to stdout. Otherwise, the description(s) will be returned as a unicode string (for testing).

Returns : None by default, the description(s) as a unicode string if _print_desc is False 
 

Example 1 : Fetching the description of max_columns. 
 

Python3




# importing the module
import pandas as pd
 
# description for max_columns
print(pd.describe_option("display.max_columns"))


Output : 
 

Example 2 : Getting the description for all the options by passing nothing in the parameter. 
 

Python3




# importing the module
import pandas as pd
 
# description for all the options
print(pd.describe_option())


Output : 
 

 

Dominic Rubhabha-Wardslaus
Dominic Rubhabha-Wardslaushttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Recent Comments