Survey banner
The Dataiku Community is moving to a new home! Some short term disruption starting next week: LEARN MORE

Replace python code with recipe

Level 2
Replace python code with recipe

Can I replace this code with recipe ?


for c in xxx:
if c not in Data_df.columns:
Data_df[c] = 0






0 Kudos
2 Replies

Yes, you can convert this as a recipe, with the input dataset as the dataset you want to check the column "c" and output as the column with value "c" as 0

A recipe needs at least one output (Dataset, File , Saved Model etc.) associated with it.

0 Kudos
Level 3

The way I understand your question @Linda97 is : 

Is there a recipe that will allow me to replace my existing code in the goal to fill every column you choose with a 0 ?

If I understood it correctly, you can use a prepare recipe and use the "Fill Column" processor and choose every column you want with a Value 0.

Hope it helped 🙂