cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

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

Recode column names

Hi,

 

I am very new to JMP and would like to know how to rename the existing column name if it contains some character string that I am looking for ?

 

For example if original column name is "ghdl_Male_test_case", how do I rename it to just "Male" ? Thanks in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Recode column names

There is a Column Recode dialog

     Cols=>Column Names=>Recode Column Names

 

Or you can use a variation on the below script to do the recoding

Names Default To Here( 1 );
dt = Current Data Table();
colNamesList = dt << get column names( string );

For Each( {col, i}, colNamesList,
	If( Contains( col, "Male" ),
		Column( dt, col ) << set name( "Male" )
	)
);
Jim

View solution in original post

3 REPLIES 3
Satya1
Level II

Re: Recode column names

I forgot to mention that I am looking to rename multiple columns using JSL script. 

txnelson
Super User

Re: Recode column names

There is a Column Recode dialog

     Cols=>Column Names=>Recode Column Names

 

Or you can use a variation on the below script to do the recoding

Names Default To Here( 1 );
dt = Current Data Table();
colNamesList = dt << get column names( string );

For Each( {col, i}, colNamesList,
	If( Contains( col, "Male" ),
		Column( dt, col ) << set name( "Male" )
	)
);
Jim
Satya1
Level II

Re: Recode column names

Thank you so much Jim :)

Recommended Articles