Nushell
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
Get Nu!
Getting Started
  • The Nushell Book
  • Command Reference
  • Cookbook
  • Language Reference Guide
  • Contributing Guide
Blog
  • English
  • 中文
  • Deutsch
  • Français
  • Español
  • 日本語
  • Português do Brasil
  • Русский язык
GitHub
  • Categories

    • Bits
    • Bytes
    • Chart
    • Conversions
    • Core
    • Database
    • Dataframe
    • Dataframe Or Lazyframe
    • Date
    • Debug
    • Default
    • Env
    • Experimental
    • Expression
    • Filesystem
    • Filters
    • Formats
    • Generators
    • Hash
    • History
    • Lazyframe
    • Math
    • Misc
    • Network
    • Path
    • Platform
    • Plugin
    • Prompt
    • Random
    • Removed
    • Shells
    • Strings
    • System
    • Viewers

into float for conversions

Convert data into floating point number.

Signature

> into float {flags} ...rest

Parameters

  • ...rest: For a data structure input, convert data at the given cell paths.

Input/output types:

inputoutput
boolfloat
floatfloat
intfloat
list<any>list<float>
recordrecord
stringfloat
tabletable

Examples

Convert string to float in table

> [[num]; ['5.01']] | into float num
╭───┬──────╮
│ # │ num  │
├───┼──────┤
│ 0 │ 5.01 │
╰───┴──────╯

Convert string to floating point number

> '1.345' | into float
1.345

Coerce list of ints and floats to float

> [4 -5.9] | into float
╭───┬───────╮
│ 0 │  4.00 │
│ 1 │ -5.90 │
╰───┴───────╯

Convert boolean to float

> true | into float
1