dropWhile

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

Returns a DataFrame containing all rows except the first rows that satisfy the given predicate.

Rows are dropped for as long as the predicate holds; the operation stops at the first row that does not satisfy it, and no later row is dropped even if it satisfies the 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.

This can include column groups and nested columns.

For more information: See dropWhile on the documentation website.

See also:

  • drop(n: Int) — drops a fixed number of first rows.

  • dropLast — drops a fixed number of last rows.

  • takeWhile — keeps the first rows while the predicate holds.

  • drop{ predicate: RowFilter<T> } — drops every row that matches the predicate.

Return

A DataFrame containing all rows except the first ones that satisfy the predicate.

Parameters

predicate

The RowFilter that the leading rows to drop must satisfy.