Styler.set_properties()

pandas.formats.style.Styler.set_properties

Styler.set_properties(subset=None, **kwargs)

Convience method for setting one or more non-data dependent properties or each cell.

New in version 0.17.1.

Parameters:

subset: IndexSlice

a valid slice for data to limit the style application to

kwargs: dict

property: value pairs to be set for each cell

Returns:

self : Styler

Examples

>>> df = pd.DataFrame(np.random.randn(10, 4))
>>> df.style.set_properties(color="white", align="right")

© 2011–2012 Lambda Foundry, Inc. and PyData Development Team
© 2008–2011 AQR Capital Management, LLC
© 2008–2014 the pandas development team
Licensed under the 3-clause BSD License.
http://pandas.pydata.org/pandas-docs/version/0.18.1/generated/pandas.formats.style.Styler.set_properties.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部