cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
OneNorthJMP
Level V

Delete columns with same value

I run into problem when i run my model with some parameters. So i want to do some data cleaning before run the model. Is there a quick way to delete columns with same values? Please advise how to do it with JSL or any other way that may fit? 

14 REPLIES 14
jimloughlin
Level III

Re: Delete columns with same value

When I run this code, it correctly identifies the duplicate cols but doesn't actually delete them.  The log shows no errors.

 

"height equal to height_copy"
"weight equal to weight_copy"
to_delete_lst = {7, 6};
Scriptable[]

 

I am running v13.2.1

Jim Loughlin
Loughlin Consulting
Georg
Level VII

Re: Delete columns with same value

Sorry, I cannot answer,

the Code works fine on JMP 15 with Win10 on my Computer,

and the last two steps are quite Basic commands that should have been implemented in JMP 13 already (but I cannot check).

 

Can you perform that both steps of

  • select columns 6+7
  • and delete selected

separately one after the other? e.g. by marking script line in Editor and Pressing the Play button.

Where exactly is the Problem?

 

Georg
txnelson
Super User

Re: Delete columns with same value

I ran this in JMP 13.2.1 and it works.....all you need to do, is to delete the lines in the code

dt << select columns(to_delete_lst);
dt << delete columns;

and replace them with

dt << delete columns( to_delete_lst);
Jim
jimloughlin
Level III

Re: Delete columns with same value

That works !!! Thanx.
Jim Loughlin
Loughlin Consulting
jimloughlin
Level III

Re: Delete columns with same value

TXNELSON's post below worked with JMPv13.2.1 .
Jim Loughlin
Loughlin Consulting