Compare multiple lists and return the intersection, difference, or union.
wrangles:
- compare.lists:
input:
- col1
- col2
output: Difference
method: difference
| → |
|
wrangles:
- compare.lists:
input:
- col1
- col2
output: Intersection
method: intersection
| → |
|
wrangles:
- compare.lists:
input:
- col1
- col2
output: Union
method: union
| → |
|
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| input | ✓ | list | List of input columns containing lists to compare. |
| output | ✓ | str | Name of the output column. |
| method | ✓ | str | Type of comparison to perform. |
| remove_duplicates | bool | Remove duplicates from the result. | |
| ignore_case | bool | Ignore case when comparing string items. |
Compare two strings using difference, intersection, overlap, or a normalized similarity score.
wrangles:
- compare.text:
input:
- col1
- col2
output: Difference
method: difference
| → |
|
wrangles:
- compare.text:
input:
- col1
- col2
output: Intersection
method: intersection
| → |
|
wrangles:
- compare.text:
input:
- Part Code1
- Part Code2
output: Overlap
method: overlap
| → |
|
wrangles:
- compare.text:
input: [Description A, Description B]
output: Similarity
method: similarity
metric: token_sort
The result is a normalized score from 0 to 1. token_sort reduces the effect of word order while retaining repeated tokens. token_set can return 1 when one token set is a subset of the other. damerau_levenshtein is sensitive to character order and handles adjacent transpositions.
wrangles:
- compare.text:
input: [Part Code1, Part Code2]
output: [Overlap, Overlap Ratio]
method: overlap
include_ratio: true
| Parameter | Required | Data Type | Notes |
|---|---|---|---|
| input | ✓ | str, list | The columns to compare. First column is the base column |
| output | ✓ | str, list | The column to output the results to |
| method | str | The comparison to perform: difference, intersection, overlap, or similarity. Default difference. |
|
| char | str | split the strings on. Default is a space (difference and intersection) | |
| non_match_char | str | Character to use for non-matching characters (overlap) | |
| include_ratio | bool | For method: overlap, include the matching-character ratio. When true, supply two output columns: overlap text followed by ratio. This is separate from the similarity metrics. |
|
| decimal_places | number | Number of decimal places to round the ratio to (overlap) | |
| exact_match | str | Value to use for exact matches (overlap) | |
| empty_a | str | Value to use for empty input a (overlap) | |
| empty_b | str | Value to use for empty input b (overlap) | |
| all_empty | str | Value to use for both inputs (overlap) | |
| case_sensitive | bool | Whether difference, intersection, and overlap comparisons are case sensitive. Default False. Similarity uses its own normalized comparison |
|
| metric | str | Similarity metric: token_sort (default), token_set, or damerau_levenshtein. Applies to method: similarity. |