Excerpt |
---|
Counts the number of instances of a specified pattern in a column and writes that value into a newly generated column. Source column is unchanged. |
D code |
---|
countpattern col: myCol on: 'honda' |
Output: Generates a new column containing the number of instances of the string honda
that appear in each row of the column, myCol
.
D code |
---|
countpattern col:column_ref [ignoreCase:true|false] [after:start_point | from: start_point] [before:end_point | to:end_point] [on:'exact_match'] |
Token | Required? | Data Type | Description |
---|
countpattern | Y | transform | Name of the transform |
col | Y | string | Source column name |
ignoreCase | N | boolean | If true , matching is case-insensitive. |
...
D code |
---|
countpattern col: MyCol after: 'Importantentry:' |
Output: Counts Counts 1
if if there is a value that appears anything that appears in the MyCol
column value after the string Important:
of value in MyCol
. If the after
value does string entry:
. If the value entry:
does not appear in the column, the output value is is 0
.
Include Page |
---|
| after Parameter |
---|
| after Parameter |
---|
|
...