Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.io.formats.style.Styler.use#

Styler.use(styles)[source]#

Set the styles on the current Styler.

Possibly uses styles fromStyler.export.

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

  • “table_attributes”: HTML attributes, typically added withset_table_attributes.

  • “table_styles”: CSS selectors and properties, typically added withset_table_styles.

  • “hide_index”: whether the index is hidden, typically added withhide_index, or a boolean list for hidden levels.

  • “hide_columns”: whether column headers are hidden, typically added withhide_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.

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)

[8]ページ先頭

©2009-2025 Movatter.jp