Method: Polars::Functions#count
- Defined in:
- lib/polars/functions/lazy.rb
#count(*columns) ⇒ Expr
Return the number of non-null values in the column.
This function is syntactic sugar for col(columns).count.
Calling this function without any arguments returns the number of rows in the
context. This way of using the function is deprecated. Please use len
instead.
97 98 99 100 101 102 103 104 |
# File 'lib/polars/functions/lazy.rb', line 97 def count(*columns) if columns.empty? warn "`Polars.count` is deprecated. Use `Polars.length` instead." return Utils.wrap_expr(Plr.len.alias("count")) end col(*columns).count end |