pandas.io.formats.style.Styler.set_table_attributes#
- Styler.set_table_attributes(attributes)[源代码]#
设置添加到
<table>
Html元素。这些是除自动(默认情况下)之外的项目
id
属性。- 参数
- attributes应力
- 退货
- self造型师
参见
Styler.set_table_styles
设置包含在
<style>
Html元素。Styler.set_td_classes
设置添加到
class
的属性<td>
Html元素。
示例
>>> df = pd.DataFrame(np.random.randn(10, 4)) >>> df.style.set_table_attributes('class="pure-table"') # ... <table class="pure-table"> ...