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)
idattribute.- Parameters
- attributesstr
- Returns
- selfStyler
See also
Styler.set_table_stylesSet the table styles included within the
<style>HTML element.Styler.set_td_classesSet the DataFrame of strings added to the
classattribute 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"> ...