pandas / 1.4.0 / reference / api / pandas.io.formats.style.styler.hide_index.html /

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 is None 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
subset :label, 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.

level :int, 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.

names :bool

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
self :Styler

See also

Styler.hide

Hide the entire index / columns, or specific rows / columns.

© 2008–2022, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.
https://pandas.pydata.org/pandas-docs/version/1.4.0/reference/api/pandas.io.formats.style.Styler.hide_index.html