how to replicate the behaviour of .map() from Python in KNIME ?

Essentially, I have a working example of .map in python like the following:

Assume I have mapping_df and df as inputs already.

Thank you!

Hi,

without knowing exactly the structure of your tables I would say that the value lookup node is the right one.

Two input tables:

  • your table which is here named df as data table
  • the table called mapping df as dictionary

Lookup - Column from the Data Table: Column A
Key Column from the dictionary Table: Column B
Value Column from the dictionary table: Column C

3 Likes

Hey,

After further fiddling I understood what you meant. I needed to select that the Lookup column be replaced then it would provide me with a list of column to replace it with. Thanks for this it really made my workflow much much simpler.

2 Likes