div
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.
Example
// In a DataFrame of item counts,
// compute how many full boxes of 10 items can be formed
val fullBoxes = df.itemCount / 10Return
A DataColumn containing the results of dividing each element of this DataColumn by value.
Parameters
The value to divide each element of this DataColumn by.
Throws
if value is equal to zero.
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.
Example
// In a DataFrame of item counts,
// compute how many full boxes of 10 items can be formed
val fullBoxes = df.itemCount / 10Return
A ColumnReference containing the results of dividing each element of this ColumnReference by value.
Parameters
The value to divide each element of this ColumnReference 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.
null values are not changed by this operation.
For more information: See div on the documentation website.
Example
// In a DataFrame of item counts,
// compute how many full boxes of 10 items can be formed
val fullBoxes = df.itemCount / 10Return
A DataColumn containing the results of dividing each element of this DataColumn by value.
Parameters
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.
Example
// In a DataFrame of distances in meters, convert them to kilometers
val distanceKm = df.distanceMeters / 1000.0Return
A DataColumn containing the results of dividing each element of this DataColumn by value.
Parameters
The value to divide each element of this DataColumn by.
Throws
Returns a DataColumn containing the results of dividing each element of this DataColumn by value.
For more information: See div on the documentation website.
Example
// In a DataFrame of hourly travel distances, compute the average distance traveled per minute
val distancePerMinute = df.distancePerHour / 60Return
A DataColumn containing the results of dividing each element of this DataColumn by value.
Parameters
The value to divide each element of this DataColumn by.
Throws
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.
Example
// In a DataFrame of item counts,
// compute how many full boxes of 10 items can be formed
val fullBoxes = df.itemCount / 10LReturn
A DataColumn containing the results of dividing each element of this DataColumn by value.
Parameters
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.
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
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.
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
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 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.
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.estimatedHoursReturn
A DataColumn containing the results of dividing this Int by each element of column.
Parameters
A DataColumn containing the elements to divide this Int by.
Throws
if column contains zero.
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.
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.estimatedHoursReturn
A ColumnReference containing the results of dividing this Int by each element of column.
Parameters
A ColumnReference containing the elements to divide this Int by.
Throws
if column contains zero.
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.
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.estimatedHoursReturn
A DataColumn containing the results of dividing this Int by each element of column.
Parameters
A DataColumn containing the elements to divide this Int by.
Throws
if column contains zero.
Returns a DataColumn containing the results of dividing this Double by each element of column.
For more information: See div on the documentation website.
Example
// Given a marketing budget of 1,000 euros,
// compute the cost per acquired customer for each campaign
val costPerCustomer = 1000.0 / df.acquiredCustomersReturn
A DataColumn containing the results of dividing this Double by each element of column.
Parameters
A DataColumn containing the elements to divide this Double by.
Throws
Returns a DataColumn containing the results of dividing this Int by each element of column.
For more information: See div on the documentation website.
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.pricePerSquareMeterReturn
A DataColumn containing the results of dividing this Int by each element of column.
Parameters
A DataColumn containing the elements to divide this Int by.
Throws
Returns a DataColumn containing the results of dividing this Double by each element of column.
For more information: See div on the documentation website.
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.pricePerSquareMeterReturn
A DataColumn containing the results of dividing this Double by each element of column.
Parameters
A DataColumn containing the elements to divide this Double by.
Throws
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.
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.fileSizeReturn
A DataColumn containing the results of dividing this Long by each element of column.
Parameters
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.
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.pricePerGramReturn
A DataColumn containing the results of dividing this BigDecimal by each element of column.
Parameters
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.
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.fileSizeReturn
A DataColumn containing the results of dividing this BigInteger by each element of column.
Parameters
A DataColumn containing the elements to divide this BigInteger by.
Throws
if column contains zero.