takeLastColsWhile
Take Last (Cols) While
This operation takes the last columns from this while they adhere to the predicate, stops as soon as it encounters one that does not, and collects the taken 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, takeLastWhile is called takeLastColsWhile when called on a String or ColumnPath resembling a ColumnGroup.
For more information: See take(Last)(Cols)(While) on the documentation website.
Check out: Grammar
Examples:
df.select{ cols{ "my" init.name}.takeLastWhile{ "my" init.name} }
df.select{ myColumnGroup.takeLastWhile{ it.any{ it == "Alice" } } }
df.select{ "myColumnGroup".takeLastColsWhile{ it.kind() == ColumnKind.Value} }
Examples for this overload:
df.select{ myColumnGroup.takeLastColsWhile{ it.name.startsWith("my") } }
See also:
take— takes a fixed number of first columns.takeLast— takes a fixed number of last columns.takeWhile— takes the first columns while a predicate holds.dropLastWhile— drops the last columns while a predicate holds.
Return
A ColumnSet containing the last columns adhering to the predicate.
Parameters
The ColumnFilter to control which columns to take.
Take Last (Cols) While
This operation takes the last columns from this while they adhere to the predicate, stops as soon as it encounters one that does not, and collects the taken 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, takeLastWhile is called takeLastColsWhile when called on a String or ColumnPath resembling a ColumnGroup.
For more information: See take(Last)(Cols)(While) on the documentation website.
Check out: Grammar
Examples:
df.select{ cols{ "my" init.name}.takeLastWhile{ "my" init.name} }
df.select{ myColumnGroup.takeLastWhile{ it.any{ it == "Alice" } } }
df.select{ "myColumnGroup".takeLastColsWhile{ it.kind() == ColumnKind.Value} }
Examples for this overload:
df.select{ "myColumnGroup".takeLastColsWhile{ it.name.startsWith("my") } }
See also:
take— takes a fixed number of first columns.takeLast— takes a fixed number of last columns.takeWhile— takes the first columns while a predicate holds.dropLastWhile— drops the last columns while a predicate holds.
Return
A ColumnSet containing the last columns adhering to the predicate.
Parameters
The ColumnFilter to control which columns to take.
Take Last (Cols) While
This operation takes the last columns from this while they adhere to the predicate, stops as soon as it encounters one that does not, and collects the taken 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, takeLastWhile is called takeLastColsWhile when called on a String or ColumnPath resembling a ColumnGroup.
For more information: See take(Last)(Cols)(While) on the documentation website.
Check out: Grammar
Examples:
df.select{ cols{ "my" init.name}.takeLastWhile{ "my" init.name} }
df.select{ myColumnGroup.takeLastWhile{ it.any{ it == "Alice" } } }
df.select{ "myColumnGroup".takeLastColsWhile{ it.kind() == ColumnKind.Value} }
Examples for this overload:
df.select{ "pathTo"["myColumnGroup"].takeLastColsWhile{ it.name.startsWith("my") } }
See also:
take— takes a fixed number of first columns.takeLast— takes a fixed number of last columns.takeWhile— takes the first columns while a predicate holds.dropLastWhile— drops the last columns while a predicate holds.
Return
A ColumnSet containing the last columns adhering to the predicate.
Parameters
The ColumnFilter to control which 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) While
This operation takes the last columns from this while they adhere to the predicate, stops as soon as it encounters one that does not, and collects the taken 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, takeLastWhile is called takeLastColsWhile when called on a String or ColumnPath resembling a ColumnGroup.
For more information: See take(Last)(Cols)(While) on the documentation website.
Check out: Grammar
Examples:
df.select{ cols{ "my" init.name}.takeLastWhile{ "my" init.name} }
df.select{ myColumnGroup.takeLastWhile{ it.any{ it == "Alice" } } }
df.select{ "myColumnGroup".takeLastColsWhile{ it.kind() == ColumnKind.Value} }
Examples for this overload:
df.select{ Type::myColumnGroup.takeLastColsWhile{ it.name.startsWith("my") } }
df.select{ DataSchemaType::myColumnGroup.takeLastColsWhile{ it.any{ it == "Alice" } } }
See also:
take— takes a fixed number of first columns.takeLast— takes a fixed number of last columns.takeWhile— takes the first columns while a predicate holds.dropLastWhile— drops the last columns while a predicate holds.
Return
A ColumnSet containing the last columns adhering to the predicate.
Parameters
The ColumnFilter to control which columns to take.