div

operator fun DataColumn<Int>.div(value: Int): DataColumn<Int>

Returns a DataColumn containing the results of dividing each element of this DataColumn by value.

The result of each division is truncated to an integer that is closer to zero.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of item counts,
// compute how many full boxes of 10 items can be formed
val fullBoxes = df.itemCount / 10

Return

A DataColumn containing the results of dividing each element of this DataColumn by value.

Parameters

value

The value to divide each element of this DataColumn by.

Throws

if value is equal to zero.


operator fun ColumnReference<Int>.div(value: Int): ColumnReference<Int>

Returns a ColumnReference containing the results of dividing each element of this ColumnReference by value.

The result of each division is truncated to an integer that is closer to zero.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of item counts,
// compute how many full boxes of 10 items can be formed
val fullBoxes = df.itemCount / 10

Return

A ColumnReference containing the results of dividing each element of this ColumnReference by value.

Parameters

value

The value to divide each element of this ColumnReference by.

Throws

if value is equal to zero.


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

Returns a DataColumn containing the results of dividing each element of this DataColumn by value.

The result of each division is truncated to an integer that is closer to zero.

null values are not changed by this operation.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of item counts,
// compute how many full boxes of 10 items can be formed
val fullBoxes = df.itemCount / 10

Return

A DataColumn containing the results of dividing each element of this DataColumn by value.

Parameters

value

The value to divide each element of this DataColumn by.

Throws

if value is equal to zero.


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

Returns a DataColumn containing the results of dividing each element of this DataColumn by value.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of distances in meters, convert them to kilometers
val distanceKm = df.distanceMeters / 1000.0

Return

A DataColumn containing the results of dividing each element of this DataColumn by value.

Parameters

value

The value to divide each element of this DataColumn by.

Throws


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

Returns a DataColumn containing the results of dividing each element of this DataColumn by value.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of hourly travel distances, compute the average distance traveled per minute
val distancePerMinute = df.distancePerHour / 60

Return

A DataColumn containing the results of dividing each element of this DataColumn by value.

Parameters

value

The value to divide each element of this DataColumn by.

Throws


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

Returns a DataColumn containing the results of dividing each element of this DataColumn by value.

The result of each division is truncated to an integer that is closer to zero.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of item counts,
// compute how many full boxes of 10 items can be formed
val fullBoxes = df.itemCount / 10L

Return

A DataColumn containing the results of dividing each element of this DataColumn by value.

Parameters

value

The value to divide each element of this DataColumn by.

Throws

if value is equal to zero.


Returns a DataColumn containing the results of dividing each element of this DataColumn by value.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of distances in miles, convert them to kilometers
val distanceKm = df.distanceMiles / BigDecimal("0.62137")

Return

A DataColumn containing the results of dividing each element of this DataColumn by value.

Parameters

value

The value to divide each element of this DataColumn by.

Throws

if value is equal to zero.


Returns a DataColumn containing the results of dividing each element of this DataColumn by value.

The result of each division is truncated to an integer that is closer to zero.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of item counts stored as BigInteger values,
// compute how many full batches of 1,000 items can be formed
val batches = df.itemCount / BigInteger("1000")

Return

A DataColumn containing the results of dividing each element of this DataColumn by value.

Parameters

value

The value to divide each element of this DataColumn by.

Throws

if value is equal to zero.


operator fun Int.div(column: DataColumn<Int>): DataColumn<Int>

Returns a DataColumn containing the results of dividing this Int by each element of column.

The result of each division is truncated to an integer that is closer to zero.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of tasks with estimated hours,
// compute how many tasks can fit into a fixed 40-hour work week
val tasksPerWeek = 40 / df.estimatedHours

Return

A DataColumn containing the results of dividing this Int by each element of column.

Parameters

column

A DataColumn containing the elements to divide this Int by.

Throws

if column contains zero.


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

Returns a ColumnReference containing the results of dividing this Int by each element of column.

The result of each division is truncated to an integer that is closer to zero.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of tasks with estimated hours,
// compute how many tasks can fit into a fixed 40-hour work week
val tasksPerWeek = 40 / df.estimatedHours

Return

A ColumnReference containing the results of dividing this Int by each element of column.

Parameters

column

A ColumnReference containing the elements to divide this Int by.

Throws

if column contains zero.


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

Returns a DataColumn containing the results of dividing this Int by each element of column.

The result of each division is truncated to an integer that is closer to zero.

If an element of column is null, the corresponding value in the resulting DataColumn is also null.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of tasks with estimated hours,
// compute how many tasks can fit into a fixed 40-hour work week
val tasksPerWeek = 40 / df.estimatedHours

Return

A DataColumn containing the results of dividing this Int by each element of column.

Parameters

column

A DataColumn containing the elements to divide this Int by.

Throws

if column contains zero.


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

Returns a DataColumn containing the results of dividing this Double by each element of column.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// Given a marketing budget of 1,000 euros,
// compute the cost per acquired customer for each campaign
val costPerCustomer = 1000.0 / df.acquiredCustomers

Return

A DataColumn containing the results of dividing this Double by each element of column.

Parameters

column

A DataColumn containing the elements to divide this Double by.

Throws


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

Returns a DataColumn containing the results of dividing this Int by each element of column.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of prices of a square meter in different places,
// compute how many square meters can be bought with a budget of 500 thousand euros
val squareMeters = 500_000 / df.pricePerSquareMeter

Return

A DataColumn containing the results of dividing this Int by each element of column.

Parameters

column

A DataColumn containing the elements to divide this Int by.

Throws


operator fun Double.div(column: DataColumn<Double>): DataColumn<Double>

Returns a DataColumn containing the results of dividing this Double by each element of column.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of prices of a square meter in different places,
// compute how many square meters can be bought with a budget of 500 thousand euros
val squareMeters = 500_000.0 / df.pricePerSquareMeter

Return

A DataColumn containing the results of dividing this Double by each element of column.

Parameters

column

A DataColumn containing the elements to divide this Double by.

Throws


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

Returns a DataColumn containing the results of dividing this Long by each element of column.

The result of each division is truncated to an integer that is closer to zero.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of file sizes in bits,
// compute how many copies of each file can fit into the given storage capacity
val fileCopies = 10_000_000_000L / df.fileSize

Return

A DataColumn containing the results of dividing this Long by each element of column.

Parameters

column

A DataColumn containing the elements to divide this Long by.

Throws

if column contains zero.


Returns a DataColumn containing the results of dividing this BigDecimal by each element of column.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of prices of a product per gram,
// compute the amount of product that can be bought with a budget of 3,451.76 euros
val productAmount = BigDecimal("3451.76") / df.pricePerGram

Return

A DataColumn containing the results of dividing this BigDecimal by each element of column.

Parameters

column

A DataColumn containing the elements to divide this BigDecimal by.

Throws

if column contains zero.


Returns a DataColumn containing the results of dividing this BigInteger by each element of column.

The result of each division is truncated to an integer that is closer to zero.

For more information: See div on the documentation website.

See also times, plus, minus.

Example

// In a DataFrame of file sizes in bits,
// compute how many copies of each file can fit into the given storage capacity
val fileCopies = BigInteger("10000000000") / df.fileSize

Return

A DataColumn containing the results of dividing this BigInteger by each element of column.

Parameters

column

A DataColumn containing the elements to divide this BigInteger by.

Throws

if column contains zero.