dropWhile

open fun <C> ColumnSet<C>.dropWhile(predicate: (ColumnWithPath<C>) -> Boolean): ColumnSet<C>

Drop (Cols) While

This operation drops the first columns from this while they adhere to the predicate, stops as soon as it encounters one that does not, and collects the remaining columns into a ColumnSet.

This function operates solely on columns at the top-level.

Any Access APIs can be used as receiver for these functions.

NOTE: To avoid ambiguity, dropWhile is called dropColsWhile when called on a String or ColumnPath resembling a ColumnGroup.

For more information: See drop(Last)(Cols)(While) on the documentation website.

Check out: Grammar

Examples:

df.select{ cols{ "my" init.name}.dropWhile{ "my" init.name} }

df.select{ myColumnGroup.dropWhile{ it.any{ it == "Alice" } } }

df.select{ "myColumnGroup".dropColsWhile{ it.kind() == ColumnKind.Value} }

Examples for this overload:

df.select{ colsOf<String>().dropWhile{ it.any{ it == "Alice" } } }

df.select{ cols{ .. }.dropWhile{ it.name.startsWith("my") } }

See also:

  • drop — drops a fixed number of first columns.

  • dropLast — drops a fixed number of last columns.

  • dropLastWhile — drops the last columns while a predicate holds.

  • takeWhile — keeps the first columns while a predicate holds.

Return

A ColumnSet containing all columns except the first ones adhering to the predicate.

Parameters

predicate

The ColumnFilter to control which columns to drop.


open fun ColumnsSelectionDsl<*>.dropWhile(predicate: (ColumnWithPath<*>) -> Boolean): ColumnSet<*>

Drop (Cols) While

This operation drops the first columns from this while they adhere to the predicate, stops as soon as it encounters one that does not, and collects the remaining columns into a ColumnSet.

This function operates solely on columns at the top-level.

Any Access APIs can be used as receiver for these functions.

NOTE: To avoid ambiguity, dropWhile is called dropColsWhile when called on a String or ColumnPath resembling a ColumnGroup.

For more information: See drop(Last)(Cols)(While) on the documentation website.

Check out: Grammar

Examples:

df.select{ cols{ "my" init.name}.dropWhile{ "my" init.name} }

df.select{ myColumnGroup.dropWhile{ it.any{ it == "Alice" } } }

df.select{ "myColumnGroup".dropColsWhile{ it.kind() == ColumnKind.Value} }

Examples for this overload:

df.select{ dropWhile{ it.any{ it == "Alice" } } }

See also:

  • drop — drops a fixed number of first columns.

  • dropLast — drops a fixed number of last columns.

  • dropLastWhile — drops the last columns while a predicate holds.

  • takeWhile — keeps the first columns while a predicate holds.

Return

A ColumnSet containing all columns except the first ones adhering to the predicate.

Parameters

predicate

The ColumnFilter to control which columns to drop.