If count occurrences processor workable now,

TimLiao
TimLiao Registered Posts: 14 ✭✭✭✭

if yes, how to fill "patter" in it.

if not, how to count one column's value's appearance

Answers

  • CoreyS
    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.

  • TimLiao
    TimLiao Registered Posts: 14 ✭✭✭✭
  • TimLiao
    TimLiao Registered Posts: 14 ✭✭✭✭

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

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

    Is this what you are looking for ?

  • TimLiao
    TimLiao Registered Posts: 14 ✭✭✭✭

    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

  • tgb417
    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
    Showing 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.

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

    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-deep-dive.html

    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

Setup Info
    Tags
      Help me…