polars.Config.set_tbl_cell_alignment
-
Set table cell alignment.
- Parameters:
-
-
formatstr -
- “LEFT”: left aligned
- “CENTER”: center aligned
- “RIGHT”: right aligned
-
- Raises:
-
- ValueError: if alignment string not recognised.
Examples
>>> df = pl.DataFrame( ... {"column_abc": [1.0, 2.5, 5.0], "column_xyz": [True, False, True]} ... ) >>> pl.Config.set_tbl_cell_alignment("RIGHT") >>> print(df) shape: (3, 2) ┌────────────┬────────────┐ │ column_abc ┆ column_xyz │ │ --- ┆ --- │ │ f64 ┆ bool │ ╞════════════╪════════════╡ │ 1.0 ┆ true │ │ 2.5 ┆ false │ │ 5.0 ┆ true │ └────────────┴────────────┘
classmethod Config.set_tbl_cell_alignment(
format: Alignment | None,
) → type[Config]
© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/api/polars.Config.set_tbl_cell_alignment.html