pandas.DataFrame.style#

property DataFrame.style[源代码]#

返回一个 Styler 对象。

包含用于构建 DataFrame 的样式化 HTML 表示的方法。

参见

io.formats.style.Styler

使用 HTML 和 CSS 根据数据帮助样式化 DataFrame 或 Series。

Examples

>>> df = pd.DataFrame({'A': [1, 2, 3]})
>>> df.style  

有关更多示例,请参阅 Table Visualization