InsertClause

class InsertClause<T>(val df: DataFrame<T>, val column: DataColumn<*>)

An intermediate class used in the insert operation.

This class itself does not perform any insertions — it is a transitional step before specifying where to insert the new column. It must be followed by one of the inserting methods to produce a new DataFrame with an inserted column.

Use the following methods to perform the insertion:

  • under - inserts a new column under the specified column group.

  • after - inserts a new column after the specified column.

  • at - inserts a new column at the specified position.

See Grammar for more details.

Constructors

Link copied to clipboard
constructor(df: DataFrame<T>, column: DataColumn<*>)

Properties

Link copied to clipboard
internal val column: DataColumn<*>
Link copied to clipboard
internal val df: DataFrame<T>

Functions

Link copied to clipboard

Inserts the new column previously specified with insert at the position immediately after the selected column (on the same level).

fun <T> InsertClause<T>.after(column: String): DataFrame<T>

Inserts the new column previously specified with insert at the position immediately after the column with the given name.

fun <T> InsertClause<T>.after(column: KProperty<*>): DataFrame<T>
fun <T> InsertClause<T>.after(columnPath: ColumnPath): DataFrame<T>
Link copied to clipboard
internal fun <T> InsertClause<T>.afterImpl(columnPath: ColumnPath): DataFrame<T>
Link copied to clipboard
fun <T> InsertClause<T>.at(position: Int): DataFrame<T>

Inserts the new column previously specified with insert at the given position in the DataFrame.

Link copied to clipboard

Inserts the new column previously specified with insert at the position immediately before the selected column (on the same level).

fun <T> InsertClause<T>.before(column: String): DataFrame<T>

Inserts the new column previously specified with insert at the position immediately before the column with the given name.

Link copied to clipboard
internal fun <T> InsertClause<T>.beforeImpl(columnPath: ColumnPath): DataFrame<T>
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Inserts the new column previously specified with insert under the selected column group.

fun <T> InsertClause<T>.under(column: String): DataFrame<T>

Inserts the new column previously specified with insert under the given column group by its name.

fun <T> InsertClause<T>.under(column: KProperty<*>): DataFrame<T>

fun <T> InsertClause<T>.under(columnPath: ColumnPath): DataFrame<T>

DEPRECATED: