Clean Whitespaces
Condense multiple spaces to a single space and convert special space characters to a standard space.
Parameters
| Name | Description | Accepted Values | Default | Required |
|---|---|---|---|---|
| I/O | ||||
input | Name or list of input columns. | string, integer, array | — | Yes |
output | Name or list of output columns. | string, array, null | null | No |
| Options | ||||
trim | Whether to trim leading and trailing spaces. Default True. | boolean | true | No |
remove_literals | Whether to remove special space characters such as new lines etc. Default True. | boolean | true | 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:
- clean_whitespaces:
input: Products
| Products |
|---|
Hello world! |
Hello universe! |
| Products |
|---|
| Hello world! |
| Hello universe! |
Access
| Requirement | Value |
|---|---|
| AI-powered | No |
| Requires WrangleWorks account | No |
| Requires subscription | No |
| Requires external API key | No |
Technical details
| Field | Value |
|---|---|
| Catalog ID | 72 |
| Catalog key | clean_whitespaces |
| Recipe key | clean_whitespaces |
| Catalog status | active |
| Lifecycle status | active |
| Recipe Writer eligible | Yes |
| Namespace | Root-level |
| Documentation group | format |
| Aliases | None |
| Runtime symbol | wrangles.recipe_wrangles.main.clean_whitespaces |
| Legacy UUID | e36e15c4-f0ad-43f8-8555-ef683a8ab892 |
Sources