any

fun <T> DataColumn<T>.any(predicate: Predicate<T>): Boolean

Returns true if at least one element in this DataColumn satisfies the given predicate.

This is a convenience alias that delegates to Iterable.any on the column's values.

For more information: See any on the documentation website.

Return

true if at least one element matches the predicate, false otherwise.

Parameters

predicate

A lambda function that takes a value from the column and returns true if it matches the condition.

See also


inline fun <T> DataFrame<T>.any(predicate: RowFilter<T>): Boolean

Returns true if at least one row in this DataFrame satisfies the given predicate.

The predicate is a RowFilter — a lambda that receives each DataRow as both this and it and is expected to return a Boolean value.

It allows you to define conditions using the row's values directly, including through extension properties for convenient and type-safe access.

For more information, See RowFilter on the documentation website. See any on the documentation website.

Example

// Check if there is at least one row where "age" is greater than 18
val hasAdults = df.any { age > 18 }

Return

true if at least one row satisfies the predicate, false otherwise.

Parameters

predicate

A RowFilter lambda that takes a DataRow (as both this and it) and returns true if the row should be considered a match.

See also