Hi, I have a bunch of column names that I need to change/remove the same portion from each column name. I know that Column Rename (Regex) is best but I can’t figure out what to put since I need to remove parentheses also.
Hi @ahortonmilsig , based on what you are looking for, you have to do in 2 renames.
If you just wanted to remove +Mean( and the closing ) as you first stated, then yes it can be done with 1 rename, since you would be replacing both with an empty string.
However, based on your example, that is not what you are asking. Based on what you said:
So, it’s not just about removing +Mean(, but replace it with a whitespace.
There are actually 2 different rules there:
Replace +Mean( by a whitespace
Remove ) or replace by an empty string
If you can’t figure out what expression to use, there is an alternative way. You can extract the headers, and do simple replace on the headers without any regex, and then replace with the new headers.