pandas / 1.4.0 / reference / api / pandas.io.formats.style.styler.highlight_max.html /

pandas.io.formats.style.Styler.highlight_max

Styler. highlight_max ( subset=None, color='yellow', axis=0, props=None ) [source]

Highlight the maximum with a style.

Parameters
subset :label, 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.

color :str, default ‘yellow’

Background color to use for highlighting.

axis :{0 or ‘index’, 1 or ‘columns’, None}, default 0

Apply to each column (axis=0 or 'index'), to each row (axis=1 or 'columns'), or to the entire DataFrame at once with axis=None.

props :str, default None

CSS properties to use for highlighting. If props is given, color is not used.

New in version 1.3.0.

Returns
self :Styler

See also

Styler.highlight_null

Highlight missing values with a style.

Styler.highlight_min

Highlight the minimum with a style.

Styler.highlight_between

Highlight a defined range with a style.

Styler.highlight_quantile

Highlight values defined by a quantile with a style.

© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.4.0/reference/api/pandas.io.formats.style.Styler.highlight_max.html