polars.Config.set_tbl_hide_column_names#

classmethod Config.set_tbl_hide_column_names(active: bool = True) type[polars.config.Config][source]#

Hide table column names.

Examples

>>> df = pl.DataFrame({"abc": [1.0, 2.5, 5.0], "xyz": [True, False, True]})
>>> pl.Config.set_tbl_hide_column_names(True)  
# ...
# shape: (3, 2)        shape: (3, 2)
# ┌─────┬───────┐      ┌─────┬───────┐
# │ abc ┆ xyz   │      │ f64 ┆ bool  │
# │ --- ┆ ---   │      ╞═════╪═══════╡
# │ f64 ┆ bool  │      │ 1.0 ┆ true  │
# ╞═════╪═══════╡  >>  │ 2.5 ┆ false │
# │ 1.0 ┆ true  │      │ 5.0 ┆ true  │
# │ 2.5 ┆ false │      └─────┴───────┘
# │ 5.0 ┆ true  │
# └─────┴───────┘