Convert based in column values

Hello,

I have a problem and I don’t know how to solve it. I have a column such as:

0
-10
-10
-10
1
-10
-10
-10
-10
-10
0
-10
-10
-10

I want to change all the -10 by its first non -10 value:

0
0
0
0
1
1
1
1
1
1
0
0
0
0

Any idea?

Thank you

Hi @jquadrada

With the Rule Engine node you make every “-10” value missing. Then use the Missing Value node to fill in the missings with the previous value. See the wf convert_column_values.knwf (17.9 KB)
gr. Hans

10 Likes

Thank you! It suits perfectly

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.