pandas.io.formats.style.Styler.applymap#

Styler.applymap(func, subset=None, **kwargs)[source]#

Apply a CSS-styling function elementwise.

Deprecated since version 2.1.0: Styler.applymap has been deprecated. Use Styler.map instead.

Parameters:
funcfunction

func should take a scalar and return a string.

subsetlabel, array-like, IndexSlice, optional

A valid 2d input to DataFrame.loc[<subset>], or, in the case of a 1d input or single key, to DataFrame.loc[:, <subset>] where the columns are prioritised, to limit data to before applying the function.

**kwargsdict

Pass along to func.

Returns:
Styler