into decimal for conversions> into decimal {flags} ...rest
...rest: for a data structure input, convert data at the given cell paths| input | output |
|---|---|
| bool | number |
| int | number |
| list<any> | list<number> |
| number | number |
| record | record |
| string | number |
| table | table |
Convert string to float in table
> [[num]; ['5.01']] |into decimalnum
╭───┬──────╮
│# │ num │
├───┼──────┤
│0│5.01│
╰───┴──────╯
Convert string to float
>'1.345'|into decimal
1.345
Coerce list of ints and floats to float
> [4-5.9] |into decimal
╭───┬───────╮
│0│4.00│
│1│-5.90│
╰───┴───────╯
Convert boolean to float
>true|into decimal
1
Use into float instead
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/into_decimal.html