Create a column with the values of another two

I have a dataframe with two columns:

ID | Day | Hour
1    1     8
2    1     14
3    1     20
4    5     8
5    5     14

I want to merge Day and Hour so I get something like:

ID | Timepoint
1    1d8h
2    1d14h
3    1d20h
4    5d8h
5    5d14h

I though rule engine could help but I didn’t find a way of doing it.

Assuming the values in Day and Hour are integers, and that you want the final result to be a string and not a KNIME duration, I’d use a String Manipulation node with the expression:

join(string($Day$),"d",string($Hour$),"h")
4 Likes

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