## Sign up to take part

Registered users can ask their own questions, contribute to discussions, and be part of the Community!

This website uses cookies. By clicking OK, you consent to the use of cookies. Read our cookie policy.

Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results forย

Registered users can ask their own questions, contribute to discussions, and be part of the Community!

- Community
- ยป
- Discussions
- ยป
- Using Dataiku
- ยป

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

Solutions shown first - Read whole discussion

1 Reply

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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

Didn't Find What You Needed?