pandas.io.formats.style.Styler.use — pandas 2.2.3 documentation (original) (raw)

Styler.use(styles)[source]#

Set the styles on the current Styler.

Possibly uses styles from Styler.export.

Parameters:

stylesdict(str, Any)

List of attributes to add to Styler. Dict keys should contain only:

Returns:

Styler

See also

Styler.export

Export 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)