JoinDsl
A specialized ColumnsSelectionDsl that allows specifying join matching columns with different names in left and right DataFrames.
JoinDsl allows you to define the columns used for joining DataFrames and provides methods to match columns with different names between the left and right side.
Provides the left DataFrame both as the receiver (this) and as the argument (it), allowing you to reference its columns directly. Use right to access columns from the right DataFrame, and match to explicitly pair columns with different names.
See also Columns selection via DSL.
For more information: See join on the documentation website.
Examples
// Join by two columns with the same names in both dataframes
dfLeft.join(dfRight) { name and city }
// Join by one column with different names —
// "firstName" in the left dataframe and "name" in the right one
dfLeft.join(dfRight) { left -> left.firstName match right.name }
// Match columns using String API
dfLeft.join(dfRight) { "symbol" match right.getValue<Char>("char") }Properties
Accesses the 'key' column of this KeyValueProperty ColumnsContainer.
Functions
Creates a new ColumnSet that contains a subset of columns from this, containing all columns after column, excluding column itself.
Creates a new ColumnSet that contains a subset of columns from this, containing all columns after column, excluding column itself.
Creates a new ColumnSet that contains a subset of columns from this, containing all columns before column, excluding column itself.
Creates a new ColumnSet that contains a subset of columns from this, containing all columns before column, excluding column itself.
Exclude a selection of columns from the current selection using the Columns Selection DSL.
Creates a new ColumnSet that contains a subset of columns from this, containing all columns from column, including column itself.
Creates a new ColumnSet that contains a subset of columns from this, containing all columns from column, including column itself.
Creates a new ColumnSet that contains a subset of columns from this, containing all columns up to column, including column itself.
Creates a new ColumnSet that contains a subset of columns from this, containing all columns up to column, including column itself.
Exclude a selection of columns from the current selection using the Columns Selection DSL.
The and operator allows you to combine selections of columns or simply select multiple columns at once.
Creates a ColumnAccessor (or SingleColumn) for a column with the given argument which can be either an index (Int) or a reference to a column (String, ColumnPath, KProperty, or ColumnAccessor; any Access APIs).
Creates a ColumnAccessor (or SingleColumn) for a column group with the given argument which can be either an index (Int) or a reference to a column (String, ColumnPath, KProperty, or ColumnAccessor; any Access APIs).
Creates a subset of columns from this that are ColumnGroups.
Creates a subset of columns from this that are ColumnGroups.
Creates a subset of columns from this that are ColumnGroups.
Creates a subset of columns from this that are ColumnGroups.
Creates a subset of columns from this that are ColumnGroups.
Creates a subset of columns from this that are ColumnGroups.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Returns all columns in this at any depth (so also inside Column Groups)
Returns all columns in this at any depth (so also inside Column Groups)
Returns all columns in this at any depth (so also inside Column Groups)
Returns all columns in this at any depth (so also inside Column Groups)
Returns all columns in this at any depth (so also inside Column Groups)
Returns all columns in this at any depth (so also inside Column Groups)
colsInGroups is a function that returns all columns at the top-levels of all column groups in this. This is useful if you want to select all columns that are "one level deeper".
colsInGroups is a function that returns all columns at the top-levels of all column groups in this. This is useful if you want to select all columns that are "one level deeper".
colsInGroups is a function that returns all columns at the top-levels of all column groups in this. This is useful if you want to select all columns that are "one level deeper".
colsInGroups is a function that returns all columns at the top-levels of all column groups in this. This is useful if you want to select all columns that are "one level deeper".
colsInGroups is a function that returns all columns at the top-levels of all column groups in this. This is useful if you want to select all columns that are "one level deeper".
colsInGroups is a function that returns all columns at the top-levels of all column groups in this. This is useful if you want to select all columns that are "one level deeper".
Returns a ColumnSet of columns from this that are a subtype of the given type C, optionally filtered by filter.
Returns a ColumnSet of columns from this that are a subtype of the given type C, optionally filtered by filter.
Creates a subset of columns from this that are of the given kind(s).
Creates a subset of columns from this that are of the given kind(s).
Creates a subset of columns from this that are of the given kind(s).
Creates a subset of columns from this that are of the given kind(s).
Creates a subset of columns from this that are of the given kind(s).
Creates a subset of columns from this that are of the given kind(s).
Exclude a selection of columns from the current selection using the Columns Selection DSL.
Creates a temporary new column by defining an expression to fill up each row.
Returns the first column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the first column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the first column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the first column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the first column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the first column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Creates a ColumnAccessor (or SingleColumn) for a frame column with the given argument which can be either an index (Int) or a reference to a column (String, ColumnPath, KProperty, or ColumnAccessor; any Access APIs).
Creates a subset of columns from this that are FrameColumns.
Creates a subset of columns from this that are FrameColumns.
Creates a subset of columns from this that are FrameColumns.
Creates a subset of columns from this that are FrameColumns.
Creates a subset of columns from this that are FrameColumns.
Creates a subset of columns from this that are FrameColumns.
Creates a ColumnAccessor (or SingleColumn) for a column with the given argument which can be either an index (Int) or a reference to a column (String, ColumnPath, KProperty, or ColumnAccessor; any Access APIs).
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.
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.
Creates a ColumnPath from the receiver and the given column name column. This is a shorthand for pathOf("myColumnName", "myNestedColumnName") and is often used in combination with ColumnPath.invoke to retrieve the value of a nested column. For instance:
Retrieves the value of this KProperty Accessor from the DataFrame.
As extension to "myColumn"["myNestedColumn"], this function enables "myColumn"["myNestedColumn"]["myDoublyNestedColumn"] as alternative to pathOf("myColumn", "myNestedColumn", "myDoublyNestedColumn")
Renaming a column in the ColumnsSelectionDsl is done by calling the infix functions named or into. They behave exactly the same, so it's up to contextual preference which one to use. Any combination of Access APIs can be used to specify the column to rename and which name should be used instead.
Retrieves the value of the column with this name from the DataFrame. This can be both typed and untyped. This is a shorthand for get("myColumnName") and can be written as "myColumnName"<MyColumnType>() instead.
Retrieves the value of the column with this name from the DataFrame. This can be both typed and untyped. This is a shorthand for get("myColumnName") and can be written as "myColumnName"() instead.
Retrieves the value of this KProperty Accessor from the DataFrame.
Retrieves the value of this ColumnPath from the DataFrame. This is a shorthand for getColumn(myColumnPath) and is most often used in combination with operator fun String.get(column: String), for instance:
Retrieves the value of this ColumnReference or -Accessor from the DataFrame.
Invokes the given ColumnsSelector using this ColumnsSelectionDsl.
Perform a selection of columns using the Columns Selection DSL on any ColumnGroup. This is more powerful than the cols filter, because now all operations of the DSL are at your disposal.
Returns the last column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the last column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the last column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the last column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the last column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns the last column from this that adheres to the optional given condition. If no column adheres to the given condition, NoSuchElementException is thrown.
Returns a new DataColumn with the given name and the values that body computes from the rows of this ColumnsContainer.
Renaming a column in the ColumnsSelectionDsl is done by calling the infix functions named or into. They behave exactly the same, so it's up to contextual preference which one to use. Any combination of Access APIs can be used to specify the column to rename and which name should be used instead.
Creates an empty ColumnsResolver / ColumnSet, essentially selecting no columns at all.
Creates a ColumnSet containing all columns from this up to (and including) endInclusive.
Creates a ColumnSet containing all columns from this up to (and including) endInclusive.
Creates a ColumnSet containing all columns from this up to (and including) endInclusive.
Perform a selection of columns using the Columns Selection DSL on any ColumnGroup. This is more powerful than the cols filter, because now all operations of the DSL are at your disposal.
Returns the single column from this. If there is no column, NoSuchElementException is thrown. If there are multiple columns, IllegalArgumentException is thrown.
Returns the single column from this. If there is no column, NoSuchElementException is thrown. If there are multiple columns, IllegalArgumentException is thrown.
Returns the single column from this. If there is no column, NoSuchElementException is thrown. If there are multiple columns, IllegalArgumentException is thrown.
Returns the single column from this. If there is no column, NoSuchElementException is thrown. If there are multiple columns, IllegalArgumentException is thrown.
Returns the single column from this. If there is no column, NoSuchElementException is thrown. If there are multiple columns, IllegalArgumentException is thrown.
Returns the single column from this. If there is no column, NoSuchElementException is thrown. If there are multiple columns, IllegalArgumentException is thrown.
Creates a ColumnAccessor (or SingleColumn) for a value column with the given argument which can be either an index (Int) or a reference to a column (String, ColumnPath, KProperty, or ColumnAccessor; any Access APIs).
Creates a subset of columns from this that are ValueColumns.
Creates a subset of columns from this that are ValueColumns.
Creates a subset of columns from this that are ValueColumns.
Creates a subset of columns from this that are ValueColumns.
Creates a subset of columns from this that are ValueColumns.
Creates a subset of columns from this that are ValueColumns.