pandas.io.formats.style.Styler.hide

pandas 3.1.1 · Styling · method

Hide labels, rows or columns in the rendered result while preserving the underlying data.

Call syntax

Styler.hide(subset=None, axis=0, level=None, names=False)

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.

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

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

level Optional
Positional or keyword
Default None
int, str, list

Choose an index level by name or integer position.

names Optional
Positional or keyword
Default False
bool

Supply explicit names for labels, fields, or levels.

Returns

Styler