polars len for dataframe
Return the number of rows in the context. This is similar to COUNT(*) in SQL.
Signature
> polars len {flags}
Input/output types:
| input | output |
|---|---|
| any | polars_expression |
Examples
Count the number of rows in the dataframe.
> [[a b]; [1 2] [3 4]] | polars into-df | polars select (polars len) | polars collect ╭───┬─────╮ │ # │ len │ ├───┼─────┤ │ 0 │ 2 │ ╰───┴─────╯
Creates a last expression from a column
> polars col a | polars last
Copyright © 2019–2026 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/polars_len.html