Set the styles on the current Styler.
Possibly uses styles from Styler.export.
“apply”: list of styler functions, typically added with apply or map.
“table_attributes”: HTML attributes, typically added with set_table_attributes.
“table_styles”: CSS selectors and properties, typically added with set_table_styles.
“hide_index”: whether the index is hidden, typically added with hide_index, or a boolean list for hidden levels.
“hide_columns”: whether column headers are hidden, typically added with hide_columns, or a boolean list for hidden levels.
“hide_index_names”: whether index names are hidden.
“hide_column_names”: whether column header names are hidden.
“css”: the css class names used.
See also
Styler.exportExport the non data dependent attributes to the current Styler.
Examples
>>> styler = pd.DataFrame([[1, 2], [3, 4]]).style
>>> styler2 = pd.DataFrame([[9, 9, 9]]).style
>>> styler.hide(axis=0).highlight_max(axis=1)
>>> export = styler.export()
>>> styler2.use(export)
© 2008–2011, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
© 2011–2025, Open source contributors
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/2.3.0/reference/api/pandas.io.formats.style.Styler.use.html