polars decimal for dataframe
Converts a string column into a decimal column
Signature
> polars decimal {flags} (infer_length)
Parameters
-
infer_length: Number of decimal points to infer.
Input/output types:
| input | output |
|---|---|
| polars_expression | polars_expression |
Examples
Modifies strings to decimal
> [[a b]; [1, '2.4']] | polars into-df | polars select (polars col b | polars decimal 2) | polars collect ╭───┬──────╮ │ # │ b │ ├───┼──────┤ │ 0 │ 2.40 │ ╰───┴──────╯
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/polars_decimal.html