Change row values based on condition

I have a dataframe with four columns:
(This is a toy example, the real dataset has thousands of rows)

ID | Test | Value | Timepoint
1    A      0.5     Day4Hour-2
1    A      1       Day4Hour-1
1    A      0.75    NaN     
1    A      234     Day4Hour2
1    A      22      Day4Hour4
1    A      672     Day4Hour8
1    A      345     Day4Hour16
1    B      2       Day4Hour-2
1    B      3       Day4Hour-1
1    B      2.5     NaN   
1    B      252     Day4Hour2
1    B      234     Day4Hour4
1    B      13      Day4Hour8

I want to:

  1. change NaN to baseline
  2. Delete all ocurrences of Day4Hour-2 and Day4Hour-1.

In the end I would like to get something like this:

ID | Test | Value | Timepoint
1    A      0.75    Baseline
1    A      234     Day4Hour2
1    A      22      Day4Hour4
1    A      672     Day4Hour8
1    A      345     Day4Hour16
1    B      2.5     Baseline
1    B      252     Day4Hour2
1    B      234     Day4Hour4
1    B      13      Day4Hour8

Hi @RoyBatty296 (again :slight_smile: )

See the lower branch of this wf: KNIME_project_2.knwf (81.8 KB). It is an adjustment to the wf from your previous post.


gr. Hans

1 Like