pandas.io.formats.style.Styler.applymap_index#

Styler.applymap_index(func, axis=0, level=None, **kwargs)[source]#

Apply a CSS-styling function to the index or column headers, elementwise.

Deprecated since version 2.1.0: Styler.applymap_index has been deprecated. Use Styler.map_index instead.

Parameters:
funcfunction

func should take a scalar and return a string.

axis{{0, 1, “index”, “columns”}}

The headers over which to apply the function.

levelint, str, list, optional

If index is MultiIndex the level(s) over which to apply the function.

**kwargsdict

Pass along to func.

Returns:
Styler