pandas.io.formats.style.Styler.set_properties
-
Styler.set_properties(subset=None, **kwargs)[source] -
Удобный метод для установки одного или нескольких свойств, не зависящих от данных, для каждой ячейки.
Параметры: subset: IndexSlice
корректный срез для
data, чтобы ограничить применение стиляkwargs: dict
пары свойство:значение для установки для каждой ячейки
Возвращает: -
self : Styler
Примеры
>>> 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.23.4/generated/pandas.io.formats.style.Styler.set_properties.html