drop

inline fun <T> DataColumn<T>.drop(predicate: Predicate<T>): DataColumn<T>

Returns a DataColumn containing only the values that do not match the given predicate.

For more information: See drop on the documentation website.

See also:

  • filter — keeps only the values that match the predicate.

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

  • dropLast — drops a fixed number of last values.

Return

A DataColumn containing the values that do not match the predicate.

Parameters

predicate

The condition used to exclude values from this DataColumn.


Returns a DataColumn containing all values of this DataColumn except the first n values.

If n is greater than or equal to the size of this DataColumn, an empty DataColumn is returned.

For more information: See drop on the documentation website.

See also:

  • dropLast — drops the last n values instead.

  • take — keeps only the first n values.

  • takeLast — keeps only the last n values.

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

Return

A DataColumn containing all values of this DataColumn except the first n, or an empty DataColumn if n is greater than or equal to its size.

Parameters

n

The number of values to drop. Must not be negative.

Throws


fun <T> DataFrame<T>.drop(n: Int): DataFrame<T>

Returns a DataFrame containing all rows except the first n rows.

If n is greater than or equal to the number of rows, an empty DataFrame is returned.

For more information: See drop on the documentation website.

See also:

  • dropLast — drops the last n rows instead.

  • dropWhile — drops the first rows while the predicate holds.

  • take — keeps only the first n rows.

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

Return

A DataFrame containing all rows except the first n, or an empty DataFrame if n is greater than or equal to the number of rows.

Parameters

n

The number of rows to drop. Must not be negative.

Throws


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

Returns a DataFrame containing all rows except the rows that satisfy 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.

This can include column groups and nested columns.

See drop on the documentation website.

See also:

  • filter — keeps only the rows that match the predicate.

  • dropWhile — drops only the first rows that match the predicate.

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

Return

A DataFrame containing all rows that do not satisfy the predicate.

Parameters

predicate

The RowFilter used to exclude rows from this DataFrame.