polars.Config.set_decimal_separator#

classmethod Config.set_decimal_separator(
separator: str | None = None,
) type[Config][source]#

Set the decimal separator character.

Parameters:
separatorstr, bool

Character to use as the decimal separator. Set to None to revert to the default (“.”).

See also

set_thousands_separator

Set the thousands grouping separator character.

Examples

>>> df = pl.DataFrame({"v": [9876.54321, 1010101.0, -123456.78]})
>>> with pl.Config(
...     tbl_cell_numeric_alignment="RIGHT",
...     thousands_separator=".",
...     decimal_separator=",",
...     float_precision=3,
... ):
...     print(df)
shape: (3, 1)
┌───────────────┐
│             v │
│           --- │
│           f64 │
╞═══════════════╡
│     9.876,543 │
│ 1.010.101,000 │
│  -123.456,780 │
└───────────────┘