pandas.io.formats.style.Styler.set_table_attributes — pandas 2.2.3 documentation (original) (raw)
- API reference
- Style
- pandas.io.fo...
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:
attributesstr
Returns:
Styler
See also
Set the table styles included within the <style>
HTML element.
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"')