Skip to content

Convert Decimal to Integer Rule (round_float_to_int) โ€‹

Converts data in a column from decimal to integer. May be useful to combine this with Column Mapping rule to convert a copy of the original column.

FieldDescriptionRequired
conversionsArray of columns to be converted from decimal to integerโœ… Yes
columnColumns in dataset to be convertedโœ… Yes
roundingType of rounding to be used. round uses standard rounding rules to next highest integer for 5 - 9 and prior integer for 1 - 4; floor rounds down to nearest integer; ceiling round up to nearest integer; truncate drops decimal and retains integerโœ… Yes

Example: โ€‹

json
{
  "description": "Convert decimal to integer Description",
  "version": "3.0.0",
  "conversions": [
    {
      "column": "dose",
      "rounding": "round"
    }
  ],
  "type": "round_float_to_int"
}

Behavior: The column dose is converted to an integer using standard rounding of any decimals.