Round
Round column(s) to the specified decimals.
Round numbers in a column to the nearest decimal point of your choosing.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name of the input column(s). | string, integer, array | — | Yes |
output | Name of the output column(s). | string, array, null | null | No |
| Formatting | ||||
decimals | Number of decimal places to round column. | integer | 0 | No |
| Conditions | ||||
if | Condition that determines whether the wrangle runs as a whole. Recipe variables may be referenced with ${variable}. | string | — | No |
where | Filter rows before applying the wrangle using SQL-like criteria, such as column1 = 123 OR column2 = 'abc'. | string | — | No |
where_params | Values used with where for parameterized criteria. Uses SQLite placeholder syntax such as ? or :name. | array, object | — | No |
Examples
wrangles:
- round:
input: Cost Per Unit
output: Cost Rounded
decimals: 2
| Cost Per Unit |
|---|
| 3.14159 |
| 2.71828 |
| Cost Rounded |
|---|
| 3.14 |
| 2.72 |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 91 |
| Catalog key | round |
| Recipe key | round |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | Root-level |
| Documentation group | format |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.pandas.round |
| Legacy UUID | 12f3111b-8511-4e42-8d3f-b5302dc3b4e4 |
Sources