PYTHON INSIDE PREPARE RECIPE

shahas71
Level 2
PYTHON INSIDE PREPARE RECIPE

Hi Everyone,

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???

 

Thanks in advance


Operating system used: windows

0 Kudos
1 Reply
shahas71
Level 2
Author

consider this as an example. needs to filter select only columns 1-6 & skip 7 & 8.

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

note : if a condition satisfies, multiplication has to be implemented on all the values in that row.

 

Need a python code that does everything as the 1st step inside a prepare recipe.

Can someone give a step by step answer to this??

Thanks in advance

0 Kudos

Labels

?
Labels (4)
A banner prompting to get Dataiku