You now have until September 15th to submit your use case or success story to the 2022 Dataiku Frontrunner Awards!ENTER YOUR SUBMISSION

Replace empty value based on condition on another row

Solved!
magic_mike
Level 1
Replace empty value based on condition on another row

Hi everyone, 

I'm trying to fill empty cells on a database based on the value on another row but I am struggling a bit on this. 

Basically I have a time based table where I have empty cells on some days. I would like to fill those cells with the value of the previous day when they happen to be  empty (example below).

Input:

DateValue

2020-01-01

1
2020-01-022
2020-01-03 
2020-01-043

 

Output:

DateValue

2020-01-01

1
2020-01-022
2020-01-032
2020-01-043

 

I know in Excel a simple if + vlookup would do the trick but I can't find a solution on Dataiku...

As my project will be used by "non-coder" colleagues, I'd like to avoid the Python function method and stick to a visual recipe.

Thank you! 

0 Kudos
1 Solution
tgb417
Neuron
Neuron

@magic_mike 

Welcome to the Dataiku community. 

In the visual prepare recipes there is a step called fill down.  Here is the documentation 

https://doc.dataiku.com/dss/latest/preparation/processors/up-down-fill.html

It looks like you might be doing some time series work.  You may find the time series plugin to be of some help as well.   

https://www.dataiku.com/product/plugins/timeseries-preparation/

let us all know how you are getting on with your project.

--Tom

View solution in original post

0 Kudos
3 Replies
tgb417
Neuron
Neuron

@magic_mike 

Welcome to the Dataiku community. 

In the visual prepare recipes there is a step called fill down.  Here is the documentation 

https://doc.dataiku.com/dss/latest/preparation/processors/up-down-fill.html

It looks like you might be doing some time series work.  You may find the time series plugin to be of some help as well.   

https://www.dataiku.com/product/plugins/timeseries-preparation/

let us all know how you are getting on with your project.

--Tom
0 Kudos
magic_mike
Level 1
Author

Thank you for your answer Tom! 

I didn't think about the time series plugin. It will be helpful for the project! 

tgb417
Neuron
Neuron

@magic_mike ,

If time series is your challenge, this Dataiku academy course might be just what you need for a detailed description on its use.

https://academy.dataiku.com/path/ml-practitioner/time-series-preparation-1

 

--Tom
0 Kudos

Labels

?
Labels (2)
A banner prompting to get Dataiku