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{ myColumnGroup.takeLastCols(2) }
df.select{ "myColumnGroup".takeLastCols(3) }
Examples for this overload:
df.select{ myColumnGroup.takeLast(1) }
See also:
take— takes the firstncolumns instead.takeWhile— takes the first columns while a predicate holds.takeLastWhile— takes the last columns while a predicate holds.dropLast— drops the lastncolumns.
Return
Parameters
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{ myColumnGroup.takeLastCols(2) }
df.select{ "myColumnGroup".takeLastCols(3) }
Examples for this overload:
df.select{ "myColumnGroup".takeLastCols(1) }
See also:
take— takes the firstncolumns instead.takeWhile— takes the first columns while a predicate holds.takeLastWhile— takes the last columns while a predicate holds.dropLast— drops the lastncolumns.
Return
Parameters
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{ myColumnGroup.takeLastCols(2) }
df.select{ "myColumnGroup".takeLastCols(3) }
Examples for this overload:
df.select{ "pathTo"["myColumnGroup"].takeLastCols(1) }
See also:
take— takes the firstncolumns instead.takeWhile— takes the first columns while a predicate holds.takeLastWhile— takes the last columns while a predicate holds.dropLast— drops the lastncolumns.
Return
Parameters
The number of columns to take.
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{ 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 firstncolumns instead.takeWhile— takes the first columns while a predicate holds.takeLastWhile— takes the last columns while a predicate holds.dropLast— drops the lastncolumns.
Return
Parameters
The number of columns to take.