cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.
  • See how to access JMP Marketplace - and - find, create & share add-ins to extend your JMP. Watch video.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

Rename columns contains certain symbol

Hello dear users/experts, 

I have a table has many columns, where some of the columns are started with "std" (some are not),

for example column names could be:

std_A, std_AX, med_XA,data_Ex,std_BN....

 

And i would like to change to 

A_std, AX_std, med_XA, data_EX, BN_std...

 

only remove std at the begining of column names and put them in the end with _

 

 

1 REPLY 1
jthi
Super User

Re: Rename columns contains certain symbol

You can get a list of column names as strings with << Get Column Names("String"), then you can loop over those using For Each(), use if statement with Starts With() to check if column name starts with "std_" and then you can use Words() (or Word()) to split the column name with "_", with that you can build new name and then set it with << Set Name()

-Jarmo

Recommended Articles