Forum Discussion

sundayDriver's avatar
sundayDriver
Microsoft Employee
6 years ago
Solved

Remove stopwords from column

Hi, I'm in Power Query and I'm trying to do the following: I have one list called stopwords, which contains a list of words to be removed from a column data from another table. How can I do this? ...
  • artemus's avatar
    6 years ago

    Something like this:

    Table.TransformColumns(table, {"Column", each List.Accumulate(stopWordList, _, (current, next) => Text.Replace(current, next, ""))})

     

    Note that this will replace words that are part of a larger word. E.g. bathroom with stop word bath turns into room.