pandas.io.formats.style.Styler.relabel_index

pandas 3.1.1 · Styling · method

Show substitute labels in the rendered table.

Call syntax

Styler.relabel_index(labels, axis=0, level=None)

Run the example

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

Parameters

ParameterRequirementAccepted values and behavior
labels Required
Positional or keyword
list-like or Index

Provide the labels used for selecting rows, renaming entries, or naming bins.

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.

Returns

Styler