Pandas.describe_option() function in Python
Last Updated :
11 Aug, 2021
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
import pandas as pd
print (pd.describe_option( "display.max_columns" ))
|
Output :
Example 2 : Getting the description for all the options by passing nothing in the parameter.
Python3
import pandas as pd
print (pd.describe_option())
|
Output :
Share your thoughts in the comments
Please Login to comment...