Sign up to take part
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Registered users can ask their own questions, contribute to discussions, and be part of the Community!
Can I replace this code with recipe ?
i=0
for c in xxx:
if c not in Data_df.columns:
Data_df[c] = 0
Thanks
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.
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.
https://doc.dataiku.com/dss/latest/preparation/processors/fill-column.html
Hope it helped ๐