pandas.io.formats.style.Styler.set_properties
-
Styler.set_properties(subset=None, **kwargs)
[source] -
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 tokwargs: 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") >>> df.style.set_properties(**{'background-color': 'yellow'})
© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/0.22.0/generated/pandas.io.formats.style.Styler.set_properties.html