pandas.io.formats.style.Styler.apply_index
pandas 3.1.1 · Styling · method
Apply a style function to index or column labels one level at a time.
Call syntax
Styler.apply_index(func, axis=0, level=None, **kwargs)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
func |
Required Positional or keyword |
function Supply a supported operation name or a callable, depending on this API. |
axis |
Optional Positional or keyword Default 0 |
{0, 1, "index", "columns"} 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. |
**kwargs |
Optional Additional keyword arguments |
Returns
Styler