Spec-Zone.ru › Nushell

polars selector exclude для выражения

Выбрать все столбцы, кроме столбцов с указанными именами. Это обратная операция по отношению к `polars selector by-name`.

Сигнатура

> polars selector exclude {flags} ...rest

Параметры

  • ...rest: Имя или имена столбцов, которые нужно исключить из выборки.

Типы входных и выходных данных:

вход выход
any polars_selector

Примеры

Выбрать все столбцы, кроме 'a' и 'b'

> {
    "a": [1.0, 2.0],
    "b": [3.0, 4.0],
    "c": [5, 6],
} |
polars into-df --as-columns |
polars select (polars selector exclude a b) |
polars collect
╭───┬───╮
│ # │ c │
├───┼───┤
│ 0 │ 5 │
│ 1 │ 6 │
╰───┴───╯

Выбрать все столбцы, кроме 'c'

> [[a b c]; [1 2 3] [4 5 6]]
    | polars into-df
    | polars select (polars selector exclude c)
    | polars collect

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

Spec-Zone.ru

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