Spec-Zone.ru › Nushell

polars integer for dataframe

Converts a string column into a integer column

Signature

> polars integer {flags} (base) (dtype)

Flags

  • --strict, -s: Raises an error as opposed to converting to null.

Parameters

  • base: An integer or expression representing the base (radix) of the number system (default is 10).
  • dtype: Data type to cast to (defaults is i64).

Input/output types:

input output
polars_expression polars_expression

Examples

Modifies strings to integer

> [[a b]; [1, '2']] | polars into-df | polars select (polars col b | polars integer) | polars collect
╭───┬───╮
│ # │ b │
├───┼───┤
│ 0 │ 2 │
╰───┴───╯

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

Spec-Zone.ru

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