polars selector boolean for expression
Select all boolean columns.
This command requires a plugin
The polars selector boolean 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.
Command Type
plugin
Signature
> polars selector boolean {flags}
Input/output types:
| input | output |
|---|---|
| any | polars_selector |
Examples
Select all boolean columns
> {
"name": ["Alice", "Bob"],
"active": [true, false],
"score": [1, 2],
} |
polars into-df --as-columns |
polars select (polars selector boolean) |
polars collect
╭───┬────────╮
│ # │ active │
├───┼────────┤
│ 0 │ true │
│ 1 │ false │
╰───┴────────╯