Функция Pandas.describe_option () в Python
У Pandas есть система опций, которая позволяет вам настраивать некоторые аспекты его поведения, причем параметры, связанные с отображением, - это те, которые пользователь, скорее всего, настроит. Давайте посмотрим, как увидеть описание указанной опции.
description_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
Пример 1: Получение описания max_columns.
# importing the moduleimport pandas as pd # description for max_columnsprint(pd.describe_option("display.max_columns")) |
Output :
Example 2 : Getting the description for all the options by passing nothing in the parameter.
# importing the moduleimport pandas as pd # description for all the optionsprint(pd.describe_option()) |
Outtput :
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course. And to begin with your Machine Learning Journey, join the Machine Learning – Basic Level Course