dropLastCols

Drop Last (Cols)

This operation collects all columns from this except the last n 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, dropLast is called dropLastCols when called on a ColumnGroup.

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

Check out: Grammar

Examples:

df.select{ cols{ "my" init.name}.dropLast(5) }

df.select{ dropLast(1) }

df.select{ myColumnGroup.dropLastCols(2) }

df.select{ "myColumnGroup".dropLastCols(3) }

Examples for this overload:

df.select{ myColumnGroup.dropLastCols() }

See also:

  • drop — drops the first n columns instead.

  • dropWhile — drops the first columns while a predicate holds.

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

  • takeLast — keeps only the last n columns.

Return

A ColumnSet containing all columns except the last n.

Parameters

n

The number of columns to drop.


open fun String.dropLastCols(n: Int): ColumnSet<*>

Drop Last (Cols)

This operation collects all columns from this except the last n 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, dropLast is called dropLastCols when called on a ColumnGroup.

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

Check out: Grammar

Examples:

df.select{ cols{ "my" init.name}.dropLast(5) }

df.select{ dropLast(1) }

df.select{ myColumnGroup.dropLastCols(2) }

df.select{ "myColumnGroup".dropLastCols(3) }

Examples for this overload:

df.select{ "myColumnGroup".dropLastCols(1) }

See also:

  • drop — drops the first n columns instead.

  • dropWhile — drops the first columns while a predicate holds.

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

  • takeLast — keeps only the last n columns.

Return

A ColumnSet containing all columns except the last n.

Parameters

n

The number of columns to drop.


Drop Last (Cols)

This operation collects all columns from this except the last n 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, dropLast is called dropLastCols when called on a ColumnGroup.

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

Check out: Grammar

Examples:

df.select{ cols{ "my" init.name}.dropLast(5) }

df.select{ dropLast(1) }

df.select{ myColumnGroup.dropLastCols(2) }

df.select{ "myColumnGroup".dropLastCols(3) }

Examples for this overload:

df.select{ "pathTo"["myColumnGroup"].dropLastCols(1) }

See also:

  • drop — drops the first n columns instead.

  • dropWhile — drops the first columns while a predicate holds.

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

  • takeLast — keeps only the last n columns.

Return

A ColumnSet containing all columns except the last n.

Parameters

n

The number of columns to drop.


open fun KProperty<*>.dropLastCols(n: Int): ColumnSet<*>

Deprecated

It's recommended to migrate to the String or Extension Properties Access API https://kotlin.github.io/dataframe/apilevels.html

Drop Last (Cols)

This operation collects all columns from this except the last n 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, dropLast is called dropLastCols when called on a ColumnGroup.

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

Check out: Grammar

Examples:

df.select{ cols{ "my" init.name}.dropLast(5) }

df.select{ dropLast(1) }

df.select{ myColumnGroup.dropLastCols(2) }

df.select{ "myColumnGroup".dropLastCols(3) }

Examples for this overload:

df.select{ DataSchemaType::myColumnGroup.dropLastCols(1) }

See also:

  • drop — drops the first n columns instead.

  • dropWhile — drops the first columns while a predicate holds.

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

  • takeLast — keeps only the last n columns.

Return

A ColumnSet containing all columns except the last n.

Parameters

n

The number of columns to drop.