polars integer
for dataframe
Converts a string column into a integer column
This command requires a plugin
The polars integer
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.
Signature
> polars integer {flags}
Input/output types:
input | output |
---|---|
any | any |
Examples
Modifies strings to integer
> [[a b]; [1, '2']] | polars into-df | polars select (polars col b | polars integer) | polars collect
╭───┬───╮
│ # │ b │
├───┼───┤
│ 0 │ 2 │
╰───┴───╯