pandas.io.formats.style.Styler.applymap

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

Apply a function elementwise.

Updates the HTML representation with the result.

Parameters
funcfunction

func should take a scalar and return a scalar.

subsetIndexSlice

A valid indexer to limit data to before applying the function. Consider using a pandas.IndexSlice.

**kwargsdict

Pass along to func.

Returns
selfStyler

See also

Styler.where