DataFrame 1.0 Help

any

Checks if there is at least one row in the DataFrame that satisfies the predicate.

Returns Boolean — true if there is at least one row that satisfies the predicate, false otherwise.

df.any { rowCondition } rowCondition: (DataRow) -> Boolean

Related operations: all, filter, single, count.

Examples

df

Check if any person age is greater than 21:

df.any { age > 21 }

Output:

false

Check if there is any person with age equal to 15 and name equal to "Alice":

df.any { age == 15 && name == "Alice" }

Output:

true
25 September 2026