cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Neo
Neo
Level VI

Vertically stack/concatenate columns with different row numbers into a single new column on the same data table

I have a data table with multiple columns (data imported from Excel).

Each column has different number of rows items.

I want to stack data from every column under each other in a newly created column.

How to achieve this?

(The stack sequence is not important as long as all data is there, but is column 1, column 2 ...column N is preferable)

When it's too good to be true, it's neither
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Vertically stack/concatenate columns with different row numbers into a single new column on the same data table

Use

     Tables=>Stack

If you want to get rid of the rows with blank data, once all of the columns are stacked, you can go in and select one of the blank cells.  Then right click and select

     Select Matching Cells

JMP will then select all rows where the cell you clicked on matches.

You can then move left to the Row State column, hover over one of the selected rows, Right Click and select 

     Delete Rows

Jim

View solution in original post

4 REPLIES 4
vince_faller
Super User (Alumni)

Re: Vertically stack/concatenate columns with different row numbers into a single new column on the same data table

SO you want to have a whole bunch of empty rows below your current data?  

I'd have to ask why? THis seems strange to me.  You could table stack and then cartesian join back to your original data table but that seems odd.  Can you make an example table of what you expect it to look like?  

Vince Faller - Predictum
Neo
Neo
Level VI

Re: Vertically stack/concatenate columns with different row numbers into a single new column on the same data table

@vince_faller  Perhaps I did not phrase my question properly. I do not see where you got the "empty rows"  from.

I have col-1, col-2, col-3 ...col-N.

Row entries in columns are different (data imported/loaded from Excel).

I want to stack the data with col-1 at the top, then col-2 below it, then col-3 below it and so on. This I want to do in a newly created Colum in the same data table where the original data is. How to achieve this?  

 

When it's too good to be true, it's neither
txnelson
Super User

Re: Vertically stack/concatenate columns with different row numbers into a single new column on the same data table

The easiest way in JMP to stack the data in the same data table is actually to stack the data as I suggested in my previous post, and then to use

     Tables=>Update

to attach the stacked data back onto the original data table.

 

I feel the need to warn you, that the resulting JMP data table will not be ideal for use in JMP.  Therefore, I assume you are looking to move the data back to Excel.  A data table has fixed rows and columns, while a spreadsheet is cell based. In a spreadsheet, data, headings, or formulas can be placed in any cell. In a data table, the structure organizes data for analysis. This structure is used by JMP analysis and graphing platforms.
     Column Headings Column names are column headings.
          Columns Columns contain data and are assigned one data type. Basic columns are either numeric or character. If a column contains both character and numeric data, the entire column’s data type is character, and the numbers are treated as character data. 

Jim
txnelson
Super User

Re: Vertically stack/concatenate columns with different row numbers into a single new column on the same data table

Use

     Tables=>Stack

If you want to get rid of the rows with blank data, once all of the columns are stacked, you can go in and select one of the blank cells.  Then right click and select

     Select Matching Cells

JMP will then select all rows where the cell you clicked on matches.

You can then move left to the Row State column, hover over one of the selected rows, Right Click and select 

     Delete Rows

Jim