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
- attributesstr
- Returns
- selfStyler
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"> ...