Skip to content

Commit

Permalink
update docstring example
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-beedie committed Sep 5, 2023
1 parent c2c5a96 commit c15731c
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions py-polars/polars/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,21 +491,26 @@ def set_tbl_cell_numeric_alignment(
Examples
--------
>>> from datetime import date
>>> df = pl.DataFrame(
... {"column_abc": [11, 2, 333], "column_xyz": [True, False, True]}
... {
... "abc": [11, 2, 333],
... "mno": [date.today(), None, date.today()],
... "xyz": [True, False, None],
... }
... )
>>> pl.Config.set_tbl_cell_numeric_alignment("RIGHT") # doctest: +SKIP
# ...
# shape: (3, 2)
# ┌────────────────────────┐
# │ column_abccolumn_xyz
# │ --- --- │
# │ i64 ┆ bool │
# ╞════════════════════════╡
# │ 11 ┆ true
# │ 2 ┆ false
# │ 333 ┆ true
# └────────────────────────┘
# shape: (3, 3)
# ┌────────────────────────┐
# │ abcmno ┆ xyz
# │ --- ┆ --- ---
# │ i64 ┆ date bool
# ╞════════════════════════╡
# │ 11 ┆ 2023-09-05 ┆ true
# │ 2 ┆ null ┆ false │
# │ 333 ┆ 2023-09-05 ┆ null
# └────────────────────────┘
Raises
------
Expand Down

0 comments on commit c15731c

Please sign in to comment.