cols

open fun <C> ColumnSet<C>.cols(predicate: (ColumnWithPath<C>) -> Boolean): ColumnSet<C>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

// although these can be shortened to just the colsOf<>{ }call

df.select{ colsOf<String>().cols{ "e" init.name() } }

df.select{ colsOf<String>()[{ it.any{ it == "Alice" } }]}

// identity call, same as all()

df.select{ colsOf<String>().cols() }

Filter vs. Cols:

If used with a predicate, cols {} functions exactly like filter {}. This is intentional, however; it is recommended to use filter {} on ColumnSets and cols {} on the rest.

Return

A ColumnSet containing the columns that match the given predicate.

Parameters

predicate

A ColumnFilter function that takes a ColumnReference and returns a Boolean.

See also


open fun ColumnsSelectionDsl<*>.cols(predicate: (ColumnWithPath<*>) -> Boolean): ColumnSet<*>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ cols{ "e" init.name() } }

df.select{ this[{ it.any{ it == "Alice" } }]}

// same as all()

df.select{ cols() }

    

Filter vs. Cols:

If used with a predicate, cols {} functions exactly like filter {}. This is intentional, however; it is recommended to use filter {} on ColumnSets and cols {} on the rest.

Return

A ColumnSet containing the columns that match the given predicate.

Parameters

predicate

A ColumnFilter function that takes a ColumnReference and returns a Boolean.

See also


open fun SingleColumn<DataRow<*>>.cols(predicate: (ColumnWithPath<*>) -> Boolean): ColumnSet<*>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ myColumnGroup.cols{ "e" init.name() } }

// same as allCols()

df.select{ myColumnGroup.cols() }

df.select{ myColumnGroup[{ ... }]}

    

Filter vs. Cols:

If used with a predicate, cols {} functions exactly like filter {}. This is intentional, however; it is recommended to use filter {} on ColumnSets and cols {} on the rest.

Return

A ColumnSet containing the columns that match the given predicate.

Parameters

predicate

A ColumnFilter function that takes a ColumnReference and returns a Boolean.

See also


open fun String.cols(predicate: (ColumnWithPath<*>) -> Boolean): ColumnSet<*>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "myGroupCol".cols{ "e" init.name() } }

df.select{ "myGroupCol"[{ it.any{ it == "Alice" } }]}

// same as allCols()

df.select{ "myGroupCol".cols() }

Filter vs. Cols:

If used with a predicate, cols {} functions exactly like filter {}. This is intentional, however; it is recommended to use filter {} on ColumnSets and cols {} on the rest.

Return

A ColumnSet containing the columns that match the given predicate.

Parameters

predicate

A ColumnFilter function that takes a ColumnReference and returns a Boolean.

See also


open fun ColumnPath.cols(predicate: (ColumnWithPath<*>) -> Boolean): ColumnSet<*>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "pathTo"["myGroupCol"].cols{ "e" init.name() } }

df.select{ "pathTo"["myGroupCol"][{ it.any{ it == "Alice" } }]}

df.select{ "pathTo"["myGroupCol"].cols() } // identity call, same as allCols

Filter vs. Cols:

If used with a predicate, cols {} functions exactly like filter {}. This is intentional, however; it is recommended to use filter {} on ColumnSets and cols {} on the rest.

Return

A ColumnSet containing the columns that match the given predicate.

Parameters

predicate

A ColumnFilter function that takes a ColumnReference and returns a Boolean.

See also


open fun <C> ColumnsSelectionDsl<*>.cols(firstCol: ColumnReference<C>, vararg otherCols: ColumnReference<C>): ColumnSet<C>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ cols(colGroup.columnA, columnB) }

df.select{ this[colGroup.columnA, columnB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnReference that points to a relative column.

otherCols

Optional additional ColumnReferences that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> SingleColumn<DataRow<*>>.cols(firstCol: ColumnReference<C>, vararg otherCols: ColumnReference<C>): ColumnSet<C>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ myColumnGroup.cols(columnA, columnB) }

df.select{ myColumnGroup[columnA, columnB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnReference that points to a relative column.

otherCols

Optional additional ColumnReferences that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> String.cols(firstCol: ColumnReference<C>, vararg otherCols: ColumnReference<C>): ColumnSet<C>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "myColumnGroup".cols(columnA, columnB) }

df.select{ "myColumnGroup"[columnA, columnB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnReference that points to a relative column.

otherCols

Optional additional ColumnReferences that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> ColumnPath.cols(firstCol: ColumnReference<C>, vararg otherCols: ColumnReference<C>): ColumnSet<C>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "pathTo"["columnGroup"].cols(columnA, columnB) }

df.select{ "pathTo"["columnGroup"].cols("pathTo"["colA"], "pathTo"["colB"]) }

df.select{ "pathTo"["columnGroup"][columnA, columnB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnReference that points to a relative column.

otherCols

Optional additional ColumnReferences that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun ColumnsSelectionDsl<*>.cols(firstCol: String, vararg otherCols: String): ColumnSet<*>
open fun <T> ColumnsSelectionDsl<*>.cols(firstCol: String, vararg otherCols: String): ColumnSet<T>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ cols("columnA", "columnB") }

df.select{ cols<String>("columnA", "columnB") }

df.select{ this["columnA", "columnB"]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A String that points to a relative column.

otherCols

Optional additional Strings that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun SingleColumn<DataRow<*>>.cols(firstCol: String, vararg otherCols: String): ColumnSet<*>
open fun <T> SingleColumn<DataRow<*>>.cols(firstCol: String, vararg otherCols: String): ColumnSet<T>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ myColumnGroup.cols("columnA", "columnB") }

df.select{ myColumnGroup["columnA", "columnB"]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A String that points to a relative column.

otherCols

Optional additional Strings that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun String.cols(firstCol: String, vararg otherCols: String): ColumnSet<*>
open fun <T> String.cols(firstCol: String, vararg otherCols: String): ColumnSet<T>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "columnGroup".cols("columnA", "columnB") }

df.select{ "columnGroup"["columnA", "columnB"]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A String that points to a relative column.

otherCols

Optional additional Strings that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun ColumnPath.cols(firstCol: String, vararg otherCols: String): ColumnSet<*>
open fun <T> ColumnPath.cols(firstCol: String, vararg otherCols: String): ColumnSet<T>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "pathTo"["columnGroup"].cols("columnA", "columnB") }

df.select{ "pathTo"["columnGroup"]["columnA", "columnB"]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A String that points to a relative column.

otherCols

Optional additional Strings that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun ColumnsSelectionDsl<*>.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<*>
open fun <T> ColumnsSelectionDsl<*>.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<T>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ cols("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ cols<String>("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ this["pathTo"["colA"], "pathTo"["colB"])]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A String that points to a relative column.

otherCols

Optional additional Strings that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun SingleColumn<DataRow<*>>.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<*>
open fun <T> SingleColumn<DataRow<*>>.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<T>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ myColumnGroup.cols("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ myColumnGroup.cols<String>("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ myColumnGroup["pathTo"["colA"], "pathTo"["colB"])]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnPath that points to a relative column.

otherCols

Optional additional ColumnPaths that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun String.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<*>
open fun <T> String.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<T>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "columnGroup".cols("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ "columnGroup".cols<String>("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ "columnGroup"[""pathTo"["colA"], "pathTo"["colB"])]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnPath that points to a relative column.

otherCols

Optional additional ColumnPaths that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun ColumnPath.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<*>
open fun <T> ColumnPath.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<T>

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "pathTo"["columnGroup"].cols("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ "pathTo"["columnGroup"].cols<String>("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ "pathTo"["columnGroup"]["pathTo"["colA"], "pathTo"["colB"])]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnPath that points to a relative column.

otherCols

Optional additional ColumnPaths that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> ColumnSet<C>.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<C>

Cols: Columns by Indices

Retrieves one or multiple columns from this in the form of a ColumnSet by their indices. If any of the indices are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1, 3, 2) }

df.select{ colsOf<Int>()[5, 1, 2]}

df.select{ "myColumnGroup".cols(0, 2) }

Examples for this overload:

df.select{ colsOf<Int>().cols(1, 3) }

df.select{ all()[5, 1]}

Return

A ColumnSet containing the columns found at the given indices.

Parameters

firstIndex

The index of the first column to retrieve.

otherIndices

The other indices of the columns to retrieve.

Throws

If any index is out of bounds.


@JvmName(name = "colsUnTyped")
open fun ColumnsSelectionDsl<*>.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<*>
open fun <T> ColumnsSelectionDsl<*>.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<T>

Cols: Columns by Indices

Retrieves one or multiple columns from this in the form of a ColumnSet by their indices. If any of the indices are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1, 3, 2) }

df.select{ colsOf<Int>()[5, 1, 2]}

df.select{ "myColumnGroup".cols(0, 2) }

Examples for this overload:

df.select{ cols(1, 3) }

df.select{ cols<String>(1, 3) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

firstIndex

The index of the first column to retrieve.

otherIndices

The other indices of the columns to retrieve.

Throws

If any index is out of bounds.


@JvmName(name = "colsUnTyped")
open fun SingleColumn<DataRow<*>>.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<*>
open fun <T> SingleColumn<DataRow<*>>.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<T>

Cols: Columns by Indices

Retrieves one or multiple columns from this in the form of a ColumnSet by their indices. If any of the indices are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1, 3, 2) }

df.select{ colsOf<Int>()[5, 1, 2]}

df.select{ "myColumnGroup".cols(0, 2) }

Examples for this overload:

df.select{ myColumnGroup.cols(1, 3) }

df.select{ myColumnGroup.cols<String>(3, 4) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

firstIndex

The index of the first column to retrieve.

otherIndices

The other indices of the columns to retrieve.

Throws

If any index is out of bounds.


@JvmName(name = "colsUnTyped")
open fun String.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<*>
open fun <T> String.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<T>

Cols: Columns by Indices

Retrieves one or multiple columns from this in the form of a ColumnSet by their indices. If any of the indices are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1, 3, 2) }

df.select{ colsOf<Int>()[5, 1, 2]}

df.select{ "myColumnGroup".cols(0, 2) }

Examples for this overload:

df.select{ "myColumnGroup".cols(5, 3, 1) }

df.select{ "myColumnGroup".cols<String>(5, 3, 1) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

firstIndex

The index of the first column to retrieve.

otherIndices

The other indices of the columns to retrieve.

Throws

If any index is out of bounds.


@JvmName(name = "colsUnTyped")
open fun ColumnPath.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<*>
open fun <T> ColumnPath.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<T>

Cols: Columns by Indices

Retrieves one or multiple columns from this in the form of a ColumnSet by their indices. If any of the indices are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1, 3, 2) }

df.select{ colsOf<Int>()[5, 1, 2]}

df.select{ "myColumnGroup".cols(0, 2) }

Examples for this overload:

df.select{ "pathTo"["myColGroup"].cols(0, 1) }

df.select{ "pathTo"["myColGroup"].cols<String>(0, 1) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

firstIndex

The index of the first column to retrieve.

otherIndices

The other indices of the columns to retrieve.

Throws

If any index is out of bounds.


open fun <C> ColumnSet<C>.cols(range: IntRange): ColumnSet<C>

Cols: Columns by Index Range

Retrieves multiple columns from this in the form of a ColumnSet by a range of indices. If any of the indices in the range are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1..3) }

df.select{ colsOf<Int>()[1..5]}

df.select{ "myColGroup".cols(0..2) }

Examples for this overload:

df.select{ colsOf<Int>().cols(1..3) }

df.select{ all()[1..5]}

Return

A ColumnSet containing the columns found at the given indices.

Parameters

range

The range of indices to retrieve in the form of an IntRange.

Throws

if any of the indices in the range are out of bounds.


@JvmName(name = "colsUnTyped")
open fun ColumnsSelectionDsl<*>.cols(range: IntRange): ColumnSet<*>
open fun <T> ColumnsSelectionDsl<*>.cols(range: IntRange): ColumnSet<T>

Cols: Columns by Index Range

Retrieves multiple columns from this in the form of a ColumnSet by a range of indices. If any of the indices in the range are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1..3) }

df.select{ colsOf<Int>()[1..5]}

df.select{ "myColGroup".cols(0..2) }

Examples for this overload:

df.select{ cols(1..3) }

df.select{ cols<String>(1..3) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

range

The range of indices to retrieve in the form of an IntRange.

Throws

if any of the indices in the range are out of bounds.


@JvmName(name = "colsUnTyped")
open fun SingleColumn<DataRow<*>>.cols(range: IntRange): ColumnSet<*>
open fun <T> SingleColumn<DataRow<*>>.cols(range: IntRange): ColumnSet<T>

Cols: Columns by Index Range

Retrieves multiple columns from this in the form of a ColumnSet by a range of indices. If any of the indices in the range are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1..3) }

df.select{ colsOf<Int>()[1..5]}

df.select{ "myColGroup".cols(0..2) }

Examples for this overload:

df.select{ myColumnGroup.cols(1..3) }

df.select{ myColumnGroup.cols<String>(1..3) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

range

The range of indices to retrieve in the form of an IntRange.

Throws

if any of the indices in the range are out of bounds.


@JvmName(name = "colsUnTyped")
open fun String.cols(range: IntRange): ColumnSet<*>
open fun <T> String.cols(range: IntRange): ColumnSet<T>

Cols: Columns by Index Range

Retrieves multiple columns from this in the form of a ColumnSet by a range of indices. If any of the indices in the range are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1..3) }

df.select{ colsOf<Int>()[1..5]}

df.select{ "myColGroup".cols(0..2) }

Examples for this overload:

df.select{ "myColGroup".cols(1..3) }

df.select{ "myColGroup".cols<String>(1..3) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

range

The range of indices to retrieve in the form of an IntRange.

Throws

if any of the indices in the range are out of bounds.


@JvmName(name = "colsUnTyped")
open fun ColumnPath.cols(range: IntRange): ColumnSet<*>
open fun <T> ColumnPath.cols(range: IntRange): ColumnSet<T>

Cols: Columns by Index Range

Retrieves multiple columns from this in the form of a ColumnSet by a range of indices. If any of the indices in the range are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1..3) }

df.select{ colsOf<Int>()[1..5]}

df.select{ "myColGroup".cols(0..2) }

Examples for this overload:

df.select{ "pathTo"["myColGroup"].cols(0..1) }

df.select{ "pathTo"["myColGroup"].cols<String>(0..1) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

range

The range of indices to retrieve in the form of an IntRange.

Throws

if any of the indices in the range are out of bounds.


open fun <C> ColumnSet<C>.cols(): ColumnSet<C>

Deprecated (with error)

This `cols()` overload will be removed in favor of `all()`. Will be ERROR in 1.0.

Replace with

this.all()

open fun SingleColumn<DataRow<*>>.cols(): ColumnSet<*>
open fun String.cols(): ColumnSet<*>
open fun ColumnPath.cols(): ColumnSet<*>

Deprecated (with error)

This `cols()` overload will be removed in favor of `allCols()`. Will be ERROR in 1.0.

Replace with

this.allCols()

open fun KProperty<*>.cols(predicate: (ColumnWithPath<*>) -> Boolean = { true }): ColumnSet<*>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ Type::columnGroup.cols{ "e" init.name() } }

df.select{ Type::columnGroup[{ it.any{ it == "Alice" } }]}

// same as allCols()

df.select{ Type::columnGroup.cols() }

Filter vs. Cols:

If used with a predicate, cols {} functions exactly like filter {}. This is intentional, however; it is recommended to use filter {} on ColumnSets and cols {} on the rest.

Return

A ColumnSet containing the columns that match the given predicate.

Parameters

predicate

A ColumnFilter function that takes a ColumnReference and returns a Boolean.

See also


open fun <C> KProperty<*>.cols(firstCol: ColumnReference<C>, vararg otherCols: ColumnReference<C>): ColumnSet<C>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ Type::myColumnGroup.cols(columnA, columnB) }

df.select{ DataSchemaType::myColumnGroup["pathTo"["colA"], "pathTo"["colB"]]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnReference that points to a relative column.

otherCols

Optional additional ColumnReferences that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun KProperty<*>.cols(firstCol: String, vararg otherCols: String): ColumnSet<*>
open fun <T> KProperty<*>.cols(firstCol: String, vararg otherCols: String): ColumnSet<T>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ Type::myColumnGroup.cols("columnA", "columnB") }

df.select{ DataSchemaType::myColumnGroup["columnA", "columnB"]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A String that points to a relative column.

otherCols

Optional additional Strings that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun KProperty<*>.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<*>
open fun <T> KProperty<*>.cols(firstCol: ColumnPath, vararg otherCols: ColumnPath): ColumnSet<T>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ Type::myColumnGroup.cols("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ Type::myColumnGroup.cols<String>("pathTo"["colA"], "pathTo"["colB"])) }

df.select{ DataSchemaType::myColumnGroup["columnA", "columnB"]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A ColumnPath that points to a relative column.

otherCols

Optional additional ColumnPaths that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> ColumnsSelectionDsl<*>.cols(firstCol: KProperty<C>, vararg otherCols: KProperty<C>): ColumnSet<C>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ cols(Type::colA, Type::colB) }

df.select{ this[Type::colA, Type::colB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A KProperty that points to a relative column.

otherCols

Optional additional KPropertys that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> SingleColumn<DataRow<*>>.cols(firstCol: KProperty<C>, vararg otherCols: KProperty<C>): ColumnSet<C>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ myColumnGroup.cols(Type::colA, Type::colB) }

df.select{ myColumnGroup[Type::colA, Type::colB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A KProperty that points to a relative column.

otherCols

Optional additional KPropertys that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> String.cols(firstCol: KProperty<C>, vararg otherCols: KProperty<C>): ColumnSet<C>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "myColumnGroup".cols(Type::colA, Type::colB) }

df.select{ "myColumnGroup"[Type::colA, Type::colB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A KProperty that points to a relative column.

otherCols

Optional additional KPropertys that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> KProperty<*>.cols(firstCol: KProperty<C>, vararg otherCols: KProperty<C>): ColumnSet<C>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ Type::myColumnGroup.cols(Type::colA, Type::colB) }

df.select{ Type::myColumnGroup[Type::colA, Type::colB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A KProperty that points to a relative column.

otherCols

Optional additional KPropertys that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


open fun <C> ColumnPath.cols(firstCol: KProperty<C>, vararg otherCols: KProperty<C>): ColumnSet<C>

Deprecated

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

Cols

Creates a subset of columns (ColumnSet) from this.

You can use either a ColumnFilter, or any of the vararg overloads for any Access APIs. The function can be both typed and untyped (in case you're supplying a column name, -path, or index (range)).

This function operates solely on columns at the top-level.

Aside from calling cols directly, you can also use the get operator in most cases.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.remove{ cols{ it.hasNulls() } }

df.select{ myGroupCol.cols(columnA, columnB) }

df.select{ colsOf<String>()[1, 3, 5]}

Examples for this overload:

df.select{ "pathTo"["columnGroup"].cols(Type::colA, Type::colB) }

df.select{ "pathTo"["columnGroup"][Type::colA, Type::colB]}

Return

A ColumnSet containing the columns that firstCol and otherCols point to.

Parameters

firstCol

A KProperty that points to a relative column.

otherCols

Optional additional KPropertys that point to relative columns.

Throws

if any of the given ColumnReferences point to a column that doesn't exist.


@JvmName(name = "colsUnTyped")
open fun KProperty<*>.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<*>
open fun <T> KProperty<*>.cols(firstIndex: Int, vararg otherIndices: Int): ColumnSet<T>

Deprecated

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

Cols: Columns by Indices

Retrieves one or multiple columns from this in the form of a ColumnSet by their indices. If any of the indices are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1, 3, 2) }

df.select{ colsOf<Int>()[5, 1, 2]}

df.select{ "myColumnGroup".cols(0, 2) }

Examples for this overload:

df.select{ Type::myColumnGroup.cols(5, 4) }

df.select{ Type::myColumnGroup.cols<String>(5, 4) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

firstIndex

The index of the first column to retrieve.

otherIndices

The other indices of the columns to retrieve.

Throws

If any index is out of bounds.


@JvmName(name = "colsUnTyped")
open fun KProperty<*>.cols(range: IntRange): ColumnSet<*>
open fun <T> KProperty<*>.cols(range: IntRange): ColumnSet<T>

Deprecated

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

Cols: Columns by Index Range

Retrieves multiple columns from this in the form of a ColumnSet by a range of indices. If any of the indices in the range are out of bounds, an IndexOutOfBoundsException is thrown.

For more information: See cols on the documentation website.

Check out: Grammar

For example:

df.select{ cols(1..3) }

df.select{ colsOf<Int>()[1..5]}

df.select{ "myColGroup".cols(0..2) }

Examples for this overload:

df.select{ Type::myColumnGroup.cols(1..3) }

df.select{ Type::myColumnGroup.cols<String>(1..3) }

Return

A ColumnSet containing the columns found at the given indices.

Parameters

range

The range of indices to retrieve in the form of an IntRange.

Throws

if any of the indices in the range are out of bounds.