Spec-Zone.ru › Nushell

polars selector string for expression

Select all string columns. Use `--include-categorical` to also select categorical columns.

Signature

> polars selector string {flags}

Flags

  • --include-categorical, -c: Also include categorical columns in the selection.

Input/output types:

input output
any polars_selector

Examples

Select all string columns

> {
    "name": ["Alice", "Bob"],
    "age": [30, 25],
    "active": [true, false],
} |
polars into-df --as-columns |
polars select (polars selector string) |
polars collect
╭───┬───────╮
│ # │ name  │
├───┼───────┤
│ 0 │ Alice │
│ 1 │ Bob   │
╰───┴───────╯

Create a selector for string and categorical columns

> polars selector string --include-categorical

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

Spec-Zone.ru

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