Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
kwmcm
Level II

Splitting columns that have multiple items

I have attached two simple data tables of something I'm sure JMP can do, but I'm not sure how. 

 

I have a much larger data table that has multiple columns with multiple names in them. 

In my Example Before, it's simple, two names in under Name column. 

 

What I'd like to do is split the two names, to make two lines- Example After. I highlighted the rows that were "updated"

 

I don't need to split anything else. 

 

Is this possible???

2 REPLIES 2
Highlighted

Re: Splitting columns that have multiple items

This could probably be done more efficiently with a script, but here is an interactive approach that will work regardless of the number of names in the Before table's Name column.

 

Highlight the Name column and choose Cols > Utilities > Text to Columns.

In the delimiter box type a comma "," and click OK. This will give you two new columns, Name 1 and Name 2.

Now Tables > Stack.  The Stack Columns are  Name 1 and Name 2. For convenience make the Stacked Data Column be called Final Name. Make sure the Non-stacked columns are set to Keep All, and click OK.

The resulting table will have some blank cells in the Final Name column. Right-click on one of those cells and select Select Matching Cells. Now go to Rows > Delete Rows. You can then get rid of the original Name column and Label column, if you wish.

 

 

Dan Obermiller
Highlighted
kwmcm
Level II

Re: Splitting columns that have multiple items

Thank you! That is exactly what I was looking for!

Article Labels

    There are no labels assigned to this post.