pandas.io.formats.style.Styler.hide_index¶
- Styler.hide_index(subset=None, level=None, names=False)[source]¶
Hide the entire index, or specific keys in the index from rendering.
This method has dual functionality:
if
subset
isNone
then the entire index, or specified levels, will be hidden whilst displaying all data-rows.if a
subset
is given then those specific rows will be hidden whilst the index itself remains visible.
Changed in version 1.3.0.
Deprecated since version 1.4.0: This method should be replaced by
hide(axis="index", **kwargs)
- Parameters:
- subsetlabel, array-like, IndexSlice, optional
A valid 1d input or single key along the index axis within DataFrame.loc[<subset>, :], to limit
data
to before applying the function.- levelint, str, list
The level(s) to hide in a MultiIndex if hiding the entire index. Cannot be used simultaneously with
subset
.New in version 1.4.0.
- namesbool
Whether to hide the index name(s), in the case the index or part of it remains visible.
New in version 1.4.0.
- Returns:
- selfStyler
See also
Styler.hide
Hide the entire index / columns, or specific rows / columns.