pandas.io.formats.style.Styler.set_table_attributes

Styler.set_table_attributes(attributes)[source]

Set the table attributes added to the <table> HTML element.

These are items in addition to automatic (by default) id attribute.

Parameters
attributes:str
Returns
self:Styler

See also

Styler.set_table_styles

Set the table styles included within the <style> HTML element.

Styler.set_td_classes

Set the DataFrame of strings added to the class attribute of <td> HTML elements.

Examples

>>> df = pd.DataFrame(np.random.randn(10, 4))
>>> df.style.set_table_attributes('class="pure-table"')
# ... <table class="pure-table"> ...

© 2008–2021, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.3.4/reference/api/pandas.io.formats.style.Styler.set_table_attributes.html