Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
I have a task to create a split recipe as well as a prepare recipe & has to be automated using python code.
I'm new to Dataiku & would like to know how it can be done.
The model data can be assumed as follows :
we have 20 columns of which only 4 needs to selected. This data needs to split as per the following rule :
column a column b column c
a - -
a b -
a b c
- b c
- - c
The above dummy data first has to be separated based on the below rule and then the multiplication has to be implemented :
Rule 1 : if there is only a in column, & some other values in other columns, then multiply everything by ab
rule 2 : if there exists a & b, then multiply by xy
rule 3 : if a, b, c then multiply by xyz
rule 4 : b & c, then multiply by cd
rule 5 : only c, then multiply by xz
rule 6 : if none, just multiply by abc
note : if a condition satisfies, multiplication has to be implemented on all the values in that row.
The first step should do this process & it has to be using a python recipe & shouldn't require constant changes nor get too complicated, as it needs to understood by users with basic knowledge.
Hope the question is clear.
Thanks in advance
Operating system used: windows
heyy @pturp thanks for the response. but this doesn't work.
What I'm trying to do is to use python code as the initial step inside a prepare recipe to filter out the data & do some calculation at the initial step. But getting error like dataiku is not defined etc..any methods that has to be followed so as to write python code inside a prepare recipe???