A calculate
transformation generates a new column by computing some operations.
Calculate
properties
Property | Type | Description |
---|---|---|
calculate |
ExprString |
A filter expression. |
as |
String |
(Required) A new field name. |
groupby |
Array[String] |
(Optional) Nominal fields to group elements by. |
Caculate expression
Use datum
to refer to each row item.
To access a field (say, cost
), you can use datum.cost
.
Filter expressions allow basic JavaScript expressions.