pandas.io.formats.style.Styler.highlight_quantile

pandas 3.1.1 · Styling · method

Highlight cells within selected quantile bounds.

Call syntax

Styler.highlight_quantile(…) Full signature
Styler.highlight_quantile(
    subset=None,
    color='yellow',
    axis=0,
    q_left=0.0,
    q_right=1.0,
    interpolation='linear',
    inclusive='both',
    props=None,
)

Run the example

Edit the example and select Run Python to see the result.

Parameters

ParameterRequirementAccepted values and behavior
subset Optional
Positional or keyword
Default None
label, array-like, IndexSlice

Restrict the operation to these labels instead of considering the whole object.

color Optional
Positional or keyword
Default 'yellow'
str

Choose the color or colors for the plot or styled cells.

axis Optional
Positional or keyword
Default 0
{0 or 'index', 1 or 'columns', None}

Choose which axis the operation acts on. The accepted axis labels depend on the receiver.

q_left Optional
Positional or keyword
Default 0.0
float
q_right Optional
Positional or keyword
Default 1.0
float
interpolation Optional
Positional or keyword
Default 'linear'
{'linear', 'lower', 'higher', 'midpoint', 'nearest'}

Choose how to compute results that fall between observed values.

inclusive Optional
Positional or keyword
Default 'both'
{'both', 'neither', 'left', 'right'}

Choose whether the start, end, both, or neither boundary is included.

props Optional
Positional or keyword
Default None
str

Supply CSS property declarations or the styles applied to matching cells.

Returns

Styler