Converts specified strings into numeric characters. Supports locales with regards to number formatting (e.g. en 100,000 vs. de 100.000), the default internal locale is en
.
Example
Example Input
dim_A | dim_B | metric_1 | metric_2 |
AAA | DDD | 111,111 | 333,333 |
BBB | EEE | 222,222 | ccc |
CCC | FFF | 333,333 | sss |
Example Output
dim_A | dim_B | metric_1 | metric_2 |
AAA | DDD | 111.111 | 333.333 |
BBB | EEE | 222.222 | 0 |
CCC | FFF | 333.333 | 0 |
I Ain't Afraid of No Code!
[
[
"convertnumbers",
{
"fields": [
"metric_1",
"metric_2"
],
"default": 0,
"subtable": null,
"strict": false,
"locale": "de",
"_comment": null
}
]
]
param list fields: Fields to be converted into numbers.
param str default: Value to be used in case conversion cannot be applied.
param str subtable: Name a subtable in which output will be stored (will create subtable where necessary).
param boolean strict: When set to true, returns None on conversion error.
param str locale: Locale as ISO alpha-2 country code.
param str comment: A comment that will appear in the Transformation UI.
Comments
0 comments
Article is closed for comments.