Significant Figures
Format a value to a specific number of significant figures.
Format a value to a specific number of significant figures
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name of the input column. | string, integer, array | — | Yes |
output | Name of the output column. | string, array, null | null | No |
| Formatting | ||||
significant_figures | Number of significant figures to format to. Default is 3. | integer | 3 | 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:
- format.significant_figures:
input: Data
significant_figures: 2
output: Data to 2 Figures
| Data |
|---|
| 1.25 |
| 12.3 |
| 55.6 |
| Data to 2 Figures |
|---|
| 1.2 |
| 12 |
| 55 |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 36 |
| Catalog key | format.significant_figures |
| Recipe key | format.significant_figures |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | format |
| Documentation group | format |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.format.significant_figures |
| Legacy UUID | a359f72a-5250-4dd8-84f6-8a8173bee0f6 |
Sources