allExcept

open fun <C> ColumnsSelectionDsl<C>.allExcept(selector: ColumnsSelector<C, *>): ColumnSet<*>

(All) (Cols) Except

Exclude a selection of columns from the current selection using the Columns Selection DSL.

For more information: See (All) (Cols) Except on the documentation website.

Check out: Grammar

On ColumnSets

This function can be explained the easiest with ColumnSets. Let's say we want all Int columns apart from age and height.

We can do:

df.select{ colsOf<Int>() except(age andheight) }

which will 'subtract' the ColumnSet created by age andheight from the ColumnSet created by colsOf<Int>().

    

This operation can also be used to exclude columns from Column Groups.

For instance:

df.select{ colsAtAnyDepth{ "a" init.name() } exceptuserData.age }

    

Note that the selection of columns to exclude from column sets is always done relative to the outer scope. Use the Extension Properties API to prevent scoping issues if possible.

    

Special case: If a column that needs to be removed appears multiple times in the ColumnSet, it is excepted each time it is encountered (including inside ColumnGroups). You could say the receiver ColumnSet is simplified before the operation is performed:

cols(a, a, a.b, a.b).except(a.b)

== cols(a).except(a.b)

In the ColumnsSelectionDsl

Instead of having to write all() except{ ... } in the DSL, you can use allExcept{ ... } to achieve the same result.

For example:

df.select{ allExcept{ userData.age andheight } }

On ColumnGroups: All Cols Except

The variant of this function on ColumnGroups is a bit different as it changes the scope relative to the column group.

    

In other words:

df.select{ myColGroup.allColsExcept{ colA andcolB } }

is shorthand for

df.select{ myColGroup.select{ all() except{ colA andcolB } } }

or

df.select{ myColGroup.allCols() except{ myColGroup.colA andmyColGroup.colB } }

    

Also note the name change, similar to allCols, this makes it clearer that you're selecting columns inside the group, 'lifting' them out.

On ColumnGroups: Except

This variant can be used to exclude some nested columns from a ColumnGroup in the selection. In contrast to allColsExcept, this function does not 'lift' the columns out of the group, preserving the structure.

So:

df.select{ colGroup.except{ col } }

is shorthand for:

df.select{ cols(colGroup) exceptcolGroup.col }

Examples for this overload

df.select{ allExcept{ "age" andheight }`` }

df.select{ allExcept{ name.firstName }`` }

Return

A ColumnSet containing all columns in this except the specified ones.

Parameters

selector

A lambda in which you specify the columns that need to be excluded from the current selection. The scope of the selector is the same as the outer scope.

See also


open fun ColumnsSelectionDsl<*>.allExcept(vararg others: ColumnsResolver<*>): ColumnSet<*>

(All) (Cols) Except

Exclude a selection of columns from the current selection using the Columns Selection DSL.

For more information: See (All) (Cols) Except on the documentation website.

Check out: Grammar

On ColumnSets

This function can be explained the easiest with ColumnSets. Let's say we want all Int columns apart from age and height.

We can do:

df.select{ colsOf<Int>() except(age andheight) }

which will 'subtract' the ColumnSet created by age andheight from the ColumnSet created by colsOf<Int>().

    

This operation can also be used to exclude columns from Column Groups.

For instance:

df.select{ colsAtAnyDepth{ "a" init.name() } exceptuserData.age }

    

Note that the selection of columns to exclude from column sets is always done relative to the outer scope. Use the Extension Properties API to prevent scoping issues if possible.

    

Special case: If a column that needs to be removed appears multiple times in the ColumnSet, it is excepted each time it is encountered (including inside ColumnGroups). You could say the receiver ColumnSet is simplified before the operation is performed:

cols(a, a, a.b, a.b).except(a.b)

== cols(a).except(a.b)

In the ColumnsSelectionDsl

Instead of having to write all() except{ ... } in the DSL, you can use allExcept{ ... } to achieve the same result.

For example:

df.select{ allExcept{ userData.age andheight } }

On ColumnGroups: All Cols Except

The variant of this function on ColumnGroups is a bit different as it changes the scope relative to the column group.

    

In other words:

df.select{ myColGroup.allColsExcept{ colA andcolB } }

is shorthand for

df.select{ myColGroup.select{ all() except{ colA andcolB } } }

or

df.select{ myColGroup.allCols() except{ myColGroup.colA andmyColGroup.colB } }

    

Also note the name change, similar to allCols, this makes it clearer that you're selecting columns inside the group, 'lifting' them out.

On ColumnGroups: Except

This variant can be used to exclude some nested columns from a ColumnGroup in the selection. In contrast to allColsExcept, this function does not 'lift' the columns out of the group, preserving the structure.

So:

df.select{ colGroup.except{ col } }

is shorthand for:

df.select{ cols(colGroup) exceptcolGroup.col }

Examples for this overload

df.select{ allExcept(age, height)`` }

df.select{ allExcept(name.firstName, name.middleName)`` }

Return

A ColumnSet containing all columns in this except the specified ones.

Parameters

others

A ColumnsResolver containing the columns that need to be excluded from the current selection.

See also


open fun ColumnsSelectionDsl<*>.allExcept(vararg others: String): ColumnSet<*>

(All) (Cols) Except

Exclude a selection of columns from the current selection using the Columns Selection DSL.

For more information: See (All) (Cols) Except on the documentation website.

Check out: Grammar

On ColumnSets

This function can be explained the easiest with ColumnSets. Let's say we want all Int columns apart from age and height.

We can do:

df.select{ colsOf<Int>() except(age andheight) }

which will 'subtract' the ColumnSet created by age andheight from the ColumnSet created by colsOf<Int>().

    

This operation can also be used to exclude columns from Column Groups.

For instance:

df.select{ colsAtAnyDepth{ "a" init.name() } exceptuserData.age }

    

Note that the selection of columns to exclude from column sets is always done relative to the outer scope. Use the Extension Properties API to prevent scoping issues if possible.

    

Special case: If a column that needs to be removed appears multiple times in the ColumnSet, it is excepted each time it is encountered (including inside ColumnGroups). You could say the receiver ColumnSet is simplified before the operation is performed:

cols(a, a, a.b, a.b).except(a.b)

== cols(a).except(a.b)

In the ColumnsSelectionDsl

Instead of having to write all() except{ ... } in the DSL, you can use allExcept{ ... } to achieve the same result.

For example:

df.select{ allExcept{ userData.age andheight } }

On ColumnGroups: All Cols Except

The variant of this function on ColumnGroups is a bit different as it changes the scope relative to the column group.

    

In other words:

df.select{ myColGroup.allColsExcept{ colA andcolB } }

is shorthand for

df.select{ myColGroup.select{ all() except{ colA andcolB } } }

or

df.select{ myColGroup.allCols() except{ myColGroup.colA andmyColGroup.colB } }

    

Also note the name change, similar to allCols, this makes it clearer that you're selecting columns inside the group, 'lifting' them out.

On ColumnGroups: Except

This variant can be used to exclude some nested columns from a ColumnGroup in the selection. In contrast to allColsExcept, this function does not 'lift' the columns out of the group, preserving the structure.

So:

df.select{ colGroup.except{ col } }

is shorthand for:

df.select{ cols(colGroup) exceptcolGroup.col }

Examples for this overload

df.select{ allExcept("age", "height")`` }

df.select{ allExcept("name")`` }

Return

A ColumnSet containing all columns in this except the specified ones.

Parameters

others

Any number of Strings referring to the columns (relative to the current scope) that need to be excluded from the current selection.

See also


open fun ColumnsSelectionDsl<*>.allExcept(vararg others: ColumnPath): ColumnSet<*>

(All) (Cols) Except

Exclude a selection of columns from the current selection using the Columns Selection DSL.

For more information: See (All) (Cols) Except on the documentation website.

Check out: Grammar

On ColumnSets

This function can be explained the easiest with ColumnSets. Let's say we want all Int columns apart from age and height.

We can do:

df.select{ colsOf<Int>() except(age andheight) }

which will 'subtract' the ColumnSet created by age andheight from the ColumnSet created by colsOf<Int>().

    

This operation can also be used to exclude columns from Column Groups.

For instance:

df.select{ colsAtAnyDepth{ "a" init.name() } exceptuserData.age }

    

Note that the selection of columns to exclude from column sets is always done relative to the outer scope. Use the Extension Properties API to prevent scoping issues if possible.

    

Special case: If a column that needs to be removed appears multiple times in the ColumnSet, it is excepted each time it is encountered (including inside ColumnGroups). You could say the receiver ColumnSet is simplified before the operation is performed:

cols(a, a, a.b, a.b).except(a.b)

== cols(a).except(a.b)

In the ColumnsSelectionDsl

Instead of having to write all() except{ ... } in the DSL, you can use allExcept{ ... } to achieve the same result.

For example:

df.select{ allExcept{ userData.age andheight } }

On ColumnGroups: All Cols Except

The variant of this function on ColumnGroups is a bit different as it changes the scope relative to the column group.

    

In other words:

df.select{ myColGroup.allColsExcept{ colA andcolB } }

is shorthand for

df.select{ myColGroup.select{ all() except{ colA andcolB } } }

or

df.select{ myColGroup.allCols() except{ myColGroup.colA andmyColGroup.colB } }

    

Also note the name change, similar to allCols, this makes it clearer that you're selecting columns inside the group, 'lifting' them out.

On ColumnGroups: Except

This variant can be used to exclude some nested columns from a ColumnGroup in the selection. In contrast to allColsExcept, this function does not 'lift' the columns out of the group, preserving the structure.

So:

df.select{ colGroup.except{ col } }

is shorthand for:

df.select{ cols(colGroup) exceptcolGroup.col }

Examples for this overload

df.select{ allExcept(pathOf("age"), "userdata"["height"])`` }

df.select{ allExcept("name"["firstName"], "name"["middleName"])`` }

Return

A ColumnSet containing all columns in this except the specified ones.

Parameters

others

Any number of ColumnPaths referring to the columns (relative to the current scope) that need to be excluded from the current selection.

See also


open fun ColumnsSelectionDsl<*>.allExcept(vararg others: KProperty<*>): ColumnSet<*>

Deprecated

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

(All) (Cols) Except

Exclude a selection of columns from the current selection using the Columns Selection DSL.

For more information: See (All) (Cols) Except on the documentation website.

Check out: Grammar

On ColumnSets

This function can be explained the easiest with ColumnSets. Let's say we want all Int columns apart from age and height.

We can do:

df.select{ colsOf<Int>() except(age andheight) }

which will 'subtract' the ColumnSet created by age andheight from the ColumnSet created by colsOf<Int>().

    

This operation can also be used to exclude columns from Column Groups.

For instance:

df.select{ colsAtAnyDepth{ "a" init.name() } exceptuserData.age }

    

Note that the selection of columns to exclude from column sets is always done relative to the outer scope. Use the Extension Properties API to prevent scoping issues if possible.

    

Special case: If a column that needs to be removed appears multiple times in the ColumnSet, it is excepted each time it is encountered (including inside ColumnGroups). You could say the receiver ColumnSet is simplified before the operation is performed:

cols(a, a, a.b, a.b).except(a.b)

== cols(a).except(a.b)

In the ColumnsSelectionDsl

Instead of having to write all() except{ ... } in the DSL, you can use allExcept{ ... } to achieve the same result.

For example:

df.select{ allExcept{ userData.age andheight } }

On ColumnGroups: All Cols Except

The variant of this function on ColumnGroups is a bit different as it changes the scope relative to the column group.

    

In other words:

df.select{ myColGroup.allColsExcept{ colA andcolB } }

is shorthand for

df.select{ myColGroup.select{ all() except{ colA andcolB } } }

or

df.select{ myColGroup.allCols() except{ myColGroup.colA andmyColGroup.colB } }

    

Also note the name change, similar to allCols, this makes it clearer that you're selecting columns inside the group, 'lifting' them out.

On ColumnGroups: Except

This variant can be used to exclude some nested columns from a ColumnGroup in the selection. In contrast to allColsExcept, this function does not 'lift' the columns out of the group, preserving the structure.

So:

df.select{ colGroup.except{ col } }

is shorthand for:

df.select{ cols(colGroup) exceptcolGroup.col }

Examples for this overload

df.select{ allExcept(Person::age, Person::height)`` }

df.select{ allExcept(Person::name)`` }

Return

A ColumnSet containing all columns in this except the specified ones.

Parameters

others

Any number of KProperties referring to the columns (relative to the current scope) that need to be excluded from the current selection.

See also