polars selector float

For expression.

Select all float columns.

warning This command requires a plugin The polars selector float command resides in the polars plugin. To use this command, you must install and register nu_plugin_polars. See the Plugins chapter in the book for more information.

Command Type

plugin

Signature

> polars selector float {flags}

Input/output types:

input output
any polars_selector

Examples

Select all float columns

> {
        "foo": ["x", "y"],
        "bar": [123, 456],
        "baz": [2.0, 5.5],
        "qux": [3.1, 2.7],
    } |
    polars into-df --as-columns |
    polars select (polars selector float) |
    polars sort-by baz qux |
    polars collect
╭───┬──────┬──────╮
│ # │ baz  │ qux  │
├───┼──────┼──────┤
│ 0 │ 2.00 │ 3.10 │
│ 1 │ 5.50 │ 2.70 │
╰───┴──────┴──────╯

Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.