takeLastCols

Take Last (Cols)

This collects the last n columns from this 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, takeLast is called takeLastCols when called on a ColumnGroup.

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

Check out: Grammar

Examples:

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

df.select{ takeLast(1) }

df.select{ myColumnGroup.takeLastCols(2) }

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

Examples for this overload:

df.select{ myColumnGroup.takeLast(1) }

See also:

  • take — takes the first n columns instead.

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

  • takeLastWhile — takes the last columns while a predicate holds.

  • dropLast — drops the last n columns.

Return

A ColumnSet containing the last n columns.

Parameters

n

The number of columns to take.


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

Take Last (Cols)

This collects the last n columns from this 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, takeLast is called takeLastCols when called on a ColumnGroup.

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

Check out: Grammar

Examples:

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

df.select{ takeLast(1) }

df.select{ myColumnGroup.takeLastCols(2) }

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

Examples for this overload:

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

See also:

  • take — takes the first n columns instead.

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

  • takeLastWhile — takes the last columns while a predicate holds.

  • dropLast — drops the last n columns.

Return

A ColumnSet containing the last n columns.

Parameters

n

The number of columns to take.


Take Last (Cols)

This collects the last n columns from this 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, takeLast is called takeLastCols when called on a ColumnGroup.

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

Check out: Grammar

Examples:

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

df.select{ takeLast(1) }

df.select{ myColumnGroup.takeLastCols(2) }

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

Examples for this overload:

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

See also:

  • take — takes the first n columns instead.

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

  • takeLastWhile — takes the last columns while a predicate holds.

  • dropLast — drops the last n columns.

Return

A ColumnSet containing the last n columns.

Parameters

n

The number of columns to take.


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

Deprecated

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

Take Last (Cols)

This collects the last n columns from this 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, takeLast is called takeLastCols when called on a ColumnGroup.

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

Check out: Grammar

Examples:

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

df.select{ takeLast(1) }

df.select{ myColumnGroup.takeLastCols(2) }

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

Examples for this overload:

df.select{ Type::myColumnGroup.takeLastCols(1) }

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

See also:

  • take — takes the first n columns instead.

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

  • takeLastWhile — takes the last columns while a predicate holds.

  • dropLast — drops the last n columns.

Return

A ColumnSet containing the last n columns.

Parameters

n

The number of columns to take.