count

statistics

Counts non-null values

Syntax

count(array|dataframe)

Parameters

array|dataframe (array or dataframe)

The data to count non-null values in

Returns

number

The count of non-null values

Examples

Input:
[1, 2, null, 3] | count
Output:
3
Count total rows in data
Input:
. | count
Output:
150
Count active users
Input:
map(select(.status == "active")) | count
Output:
87

The count() function counts the number of non-null values in an array or DataFrame.

Usage

Use count() to determine the number of valid entries in your data, filtering out null or missing values.

Related Functions