minus

operator fun DataColumn<Int>.minus(value: Int): DataColumn<Int>
@JvmName(name = "minusDouble")
operator fun DataColumn<Double>.minus(value: Int): DataColumn<Double>

Returns a DataColumn where each element is the result of subtracting value from the corresponding element of this DataColumn.

That is, value is subtracted from each element of the DataColumn.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// In a DataFrame of financial transactions,
// subtract a fixed fee from each transaction amount
df.amount - 10

Return

A DataColumn containing the results of subtracting value from each element of this DataColumn.


Returns a ColumnReference where each element is the result of subtracting value from the corresponding element of this ColumnReference.

That is, value is subtracted from each element of the ColumnReference.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// In a DataFrame of financial transactions,
// subtract a fixed fee from each transaction amount
df.amount - 10

Return

A ColumnReference containing the results of subtracting value from each element of this ColumnReference.


@JvmName(name = "minusIntNullable")
operator fun DataColumn<Int?>.minus(value: Int): DataColumn<Int?>

Returns a DataColumn where each element is the result of subtracting value from the corresponding element of this DataColumn.

That is, value is subtracted from each element of the DataColumn.

null values are not changed by this operation.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// In a DataFrame of financial transactions,
// subtract a fixed fee from each transaction amount
df.amount - 10

Return

A DataColumn containing the results of subtracting value from each element of this DataColumn.


@JvmName(name = "minusInt")
operator fun DataColumn<Int>.minus(value: Double): DataColumn<Double>
operator fun DataColumn<Double>.minus(value: Double): DataColumn<Double>

Returns a DataColumn where each element is the result of subtracting value from the corresponding element of this DataColumn.

That is, value is subtracted from each element of the DataColumn.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// In a DataFrame of financial transactions,
// subtract a fixed fee from each transaction amount
df.amount - 10.0

Return

A DataColumn containing the results of subtracting value from each element of this DataColumn.


operator fun DataColumn<Long>.minus(value: Long): DataColumn<Long>

Returns a DataColumn where each element is the result of subtracting value from the corresponding element of this DataColumn.

That is, value is subtracted from each element of the DataColumn.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// In a DataFrame of financial transactions,
// subtract a fixed fee from each transaction amount
df.amount - 10L

Return

A DataColumn containing the results of subtracting value from each element of this DataColumn.


Returns a DataColumn where each element is the result of subtracting value from the corresponding element of this DataColumn.

That is, value is subtracted from each element of the DataColumn.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// In a DataFrame of financial transactions,
// subtract a fixed fee from each transaction amount
df.amount - BigDecimal("12.03")

Return

A DataColumn containing the results of subtracting value from each element of this DataColumn.


Returns a DataColumn where each element is the result of subtracting value from the corresponding element of this DataColumn.

That is, value is subtracted from each element of the DataColumn.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// Given a DataFrame of current disks usage in bits,
// compute the total disks usage if a file is deleted
val totalDisksUsage = df.diskUsage - BigInteger("12345678900")

Return

A DataColumn containing the results of subtracting value from each element of this DataColumn.


operator fun Int.minus(column: DataColumn<Int>): DataColumn<Int>
@JvmName(name = "intMinus")
operator fun Int.minus(column: DataColumn<Double>): DataColumn<Double>

Returns a DataColumn where each element is the result of subtracting the corresponding element of column from this Int.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// Given a budget of 1000 euros per employee,
// compute the remaining budget for each employee after expenses
val remainingBudget = 1000 - df.expenses

Return

A DataColumn containing the results of subtracting the corresponding element of column from this Int.

Parameters

column

A DataColumn containing the elements to subtract from this Int.


operator fun Int.minus(column: ColumnReference<Int>): ColumnReference<Int>

Returns a ColumnReference where each element is the result of subtracting the corresponding element of column from this Int.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// Given a budget of 1000 euros per employee,
// compute the remaining budget for each employee after expenses
val remainingBudget = 1000 - df.expenses

Return

A ColumnReference containing the results of subtracting the corresponding element of column from this Int.

Parameters

column

A ColumnReference containing the elements to subtract from this Int.


@JvmName(name = "minusNullable")
operator fun Int.minus(column: DataColumn<Int?>): DataColumn<Int?>

Returns a DataColumn where each element is the result of subtracting the corresponding element of column from this Int.

null values from the original column remain null values in the resulting DataColumn.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// Given a budget of 1000 euros per employee,
// compute the remaining budget for each employee after expenses
val remainingBudget = 1000 - df.expenses

Return

A DataColumn containing the results of subtracting the corresponding element of column from this Int.

Parameters

column

A DataColumn containing the elements to subtract from this Int.


@JvmName(name = "doubleMinus")
operator fun Double.minus(column: DataColumn<Int>): DataColumn<Double>
operator fun Double.minus(column: DataColumn<Double>): DataColumn<Double>

Returns a DataColumn where each element is the result of subtracting the corresponding element of column from this Double.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// Given a budget of 1000 euros per employee,
// compute the remaining budget for each employee after expenses
val remainingBudget = 1000.0 - df.expenses

Return

A DataColumn containing the results of subtracting the corresponding element of column from this Double.

Parameters

column

A DataColumn containing the elements to subtract from this Double.


operator fun Long.minus(column: DataColumn<Long>): DataColumn<Long>

Returns a DataColumn where each element is the result of subtracting the corresponding element of column from this Long.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// Given a budget of 1000 euros per employee,
// compute the remaining budget for each employee after expenses
val remainingBudget = 1000L - df.expenses

Return

A DataColumn containing the results of subtracting the corresponding element of column from this Long.

Parameters

column

A DataColumn containing the elements to subtract from this Long.


Returns a DataColumn where each element is the result of subtracting the corresponding element of column from this BigDecimal.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// Given a budget of 1000 euros per employee,
// compute the remaining budget for each employee after expenses
val remainingBudget = BigDecimal("1000.00") - df.expenses

Return

A DataColumn containing the results of subtracting the corresponding element of column from this BigDecimal.

Parameters

column

A DataColumn containing the elements to subtract from this BigDecimal.


Returns a DataColumn where each element is the result of subtracting the corresponding element of column from this BigInteger.

For more information: See minus on the documentation website.

See also plus, times, div.

Example

// Given the current disk usage in bits,
// and a DataFrame of file sizes in bits, compute the total disk usage if any file is deleted
val diskUsage = BigInteger("12345678900") - df.fileSize

Return

A DataColumn containing the results of subtracting the corresponding element of column from this BigInteger.

Parameters

column

A DataColumn containing the elements to subtract from this BigInteger.


infix operator fun <T> DataFrame<T>.minus(columns: ColumnsSelector<T, *>): DataFrame<T>
infix operator fun <T> DataFrame<T>.minus(column: String): DataFrame<T>
infix operator fun <T> DataFrame<T>.minus(column: ColumnReference<*>): DataFrame<T>
infix operator fun <T> DataFrame<T>.minus(columns: KProperty<*>): DataFrame<T>

Deprecated (with error)

This minus overload will be removed in favor of `remove`. Will be ERROR in 1.0.

Replace with

this.remove(columns)