Spec-Zone.ru › Nushell

polars selector by-dtype for expression

Creates a selector that selects columns by data type.

Signature

> polars selector by-dtype {flags} ...rest

Parameters

  • ...rest: Data types to select (e.g., i64, f64, str, bool).

Input/output types:

input output
any polars_selector

Examples

Create a selector for numeric columns

> polars selector by-dtype i64 f64

Double all integer columns using with-column

> [[a b c]; [1 2 "x"] [3 4 "y"]]
                    | polars into-df
                    | polars with-column ((polars selector by-dtype i64) * 2)
                    | polars collect
╭───┬───┬───┬───╮
│ # │ a │ b │ c │
├───┼───┼───┼───┤
│ 0 │ 2 │ 4 │ x │
│ 1 │ 6 │ 8 │ y │
╰───┴───┴───┴───╯

Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/polars_selector_by-dtype.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API