Want to remove common pattern from column names.

Himanshu_PantHimanshu_Pant Member Posts: 46 Contributor I
I have a datset which contain a common pattern across all the column name. E.g.

average(column1)    average(column2)  average(column3)  average(column4).

I want column name like: 
column1                    column2          column3              column4

so how to remove, average() from each column name.

P.S. Please suggest a way without using a loop. If not, than loop will also work.

Best Answer

  • Options
    kaymankayman Member Posts: 662 Unicorn
    Solution Accepted
    use rename by replace, and replace average\((.*)\) with $1
Sign In or Register to comment.