If count occurrences processor workable now,

TimLiao
Level 2
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

0 Kudos
6 Replies
CoreyS
Dataiker Alumni

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.

Looking for more resources to help you use Dataiku effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as โ€˜Accepted Solutionโ€™ to help others like you!
0 Kudos
TimLiao
Level 2
Author

Pattern option.jpg

0 Kudos
TimLiao
Level 2
Author

how i fill the pattern in posted photo when i want to count occurance

0 Kudos
Jurre
Level 5

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). pattern.jpg

Is this what you are looking for ? 

TimLiao
Level 2
Author

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.

Count.jpg

0 Kudos
tgb417

@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
Showing selecting a Partition in the Window Visual RecipieShowing selecting a Partition in the Window Visual Recipie

 Second, you would include a count of the number of records in the windowed partition.

Asking for a count in the Window Aggregation screen.Asking for a count in the Window Aggregation screen.

 This would then give you the two columns you are looking for.

Window Visual Recipe Option to change file name.Window Visual Recipe Option to change file name.

 

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.  

https://knowledge.dataiku.com/latest/courses/advanced-data-prep/visual-recipes-102/window/window-dee...

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

--Tom