If count occurrences processor workable now,
if yes, how to fill "patter" in it.
if not, how to count one column's value's appearance
Answers
-
CoreyS Dataiker Alumni, Dataiku DSS Core Designer, Dataiku DSS Core Concepts, Registered Posts: 1,150 ✭✭✭✭✭✭✭✭✭
Hi, @TimLiao
, thank you for posting! Can you provide any further details on the thread to assist users in helping you find a solution (insert examples like Dataikuversion etc.) Also, can you let us know if you’ve tried any fixes already? This should lead to a quicker response from the community. -
-
how i fill the pattern in posted photo when i want to count occurance
-
Jurre Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered, Dataiku DSS Developer, Neuron 2022 Posts: 115 ✭✭✭✭✭✭✭
hi @TimLiao
,attached screenshot shows a simple setup for counting occurrences of substring "ee", and what happens then in the output-column. In case of a Regular expression you can enter that (for example ^.ee.* to search for anything with 2 e's after the first character).
Is this what you are looking for ?
-
Jurre:
Thanks, i got the meaning of pattern now, but my request is very simple, just want to count the appearance of the value in column. sample attached.
Can you help to advise how to get it as no count formula available here.
thank you veyr much.
-
tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,598 Neuron
@TimLiao
,In your example you seem to:
- Want to keep all of your rows.
- Put the count of the rows that have the same value in Column 1 into Column 2
- Repeat this for all of the unique values (windows) of column 1.
If I understand that correctly:
You might take a look at the Window Visual Recipe.
You would want to window on Column 1
Second, you would include a count of the number of records in the windowed partition.
This would then give you the two columns you are looking for.
You can convert this to SQL if you are working with a SQL database backend. This might be a bit more performant.
There are training materials for the visual recipe that you can learn more about.
Here is another post from the community that might help as well.
https://community.dataiku.com/t5/Using-Dataiku/Count-rows-within-group/m-p/10599
Hope this helps. Let us know how you get on with this.
--Tom