pandas.io.formats.style.Styler.set_table_attributes
- Styler.set_table_attributes(attributes)[source]
-
Задать атрибуты таблицы, добавляемые в HTML-элемент
<table>.Это элементы в дополнение к атрибуту
id, добавляемому автоматически (по умолчанию).- Параметры:
-
- attributes:str
- Возвращает:
-
- Styler
См. также
Styler.set_table_styles-
Задать стили таблицы, включаемые в HTML-элемент
<style>. Styler.set_td_classes-
Задать DataFrame со строками, добавляемыми к атрибуту
classHTML-элементов<td>.
Примеры
>>> df = pd.DataFrame(np.random.randn(10, 4)) >>> df.style.set_table_attributes('class="pure-table"') # ... <table class="pure-table"> ...
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.io.formats.style.Styler.set_table_attributes.html