cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
See how to use to use Text Explorer to glean valuable information from text data at April 25 webinar.
Choose Language Hide Translation Bar
View Original Published Thread

Delete Column

skyzvoir0001
Level III

I have 190+ columns and I wanted to delete columns stored in the list

Remain_columns = { column names I want to remain}.
How do I do it using for loop?

1 REPLY 1
txnelson
Super User


Re: Delete Column

You do not have to loop through the names.  That is, assuming you want all of the columns named in that list to be deleted.  Below is a simple example 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

namesCol = dt << get column names( string, continuous );

dt << delete columns( namesCol );
Jim