The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Want to remove common pattern from column names.

Himanshu_PantHimanshu_Pant Member Posts: 46 Learner II
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

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