pandas.io.formats.style.Styler.applymap

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

Apply a function elementwise, updating 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
Scroll To Top