Set the styles on the current Styler.

Possibly uses styles from Styler.export.

stylesdict(str, Any)
List of attributes to add to Styler. Dict keys should contain only:
  • “apply”: list of styler functions, typically added with apply or applymap.

  • “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


Export the non data dependent attributes to the current Styler.


>>> styler = DataFrame([[1, 2], [3, 4]]).style
>>> styler2 = DataFrame([[9, 9, 9]]).style
>>> styler.hide(axis=0).highlight_max(axis=1)  
>>> export = styler.export()
>>> styler2.use(export)