Looping and String Manipulation with Dictionary

Hi! I am trying to use a loop node to remove a list of words from a data column, but I am having a little trouble.

I have a string column called “Treated data” with >700k rows and I want to remove specific words from it. When they were only 2 or 3 words I was using the string manipulation node with the function:
replace($Treated data$, “WORD_1”, “”), then replace($Treated data$, “WORD_2”, “”) and so on, but now I need to remove about 50 words.

I created a second table with all the words I want to remove and I tried using the Table Row to Variable Loop Start and then the String Manipulation node with the function:

replace($Treated data$, $${Word}$$, “”),

but the output has concatenated rows of each iteration individually, and what I need is the String manipulation node to act on the result of the previous iteration.
Is “Recursive loop” the node I need? How do I configure it so it (recursively) goes through every possible value in my word list?

Thank you very much in advance,

Hi @aliciapalacio -

I moved your post to its own topic in the main AP forum so it would get a little more visibility. :slight_smile:

Based on your description, it doesn’t sound to me like a recursive loop will be needed. Could you perhaps upload a workflow showing your progress so far? That would help folks better understand what you are trying to do.

Thank you very much!

I found a simple way to do it using a Recursive Loop with 2 ports, but I will check this topic to see if I can learn a more efficient way to do it.

Thanks again,

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