cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Discussions

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

Editing rows in a large data table

I have a large data table and want to delete every other row. Is there a way to do this with one command or does one have to go through the table manually removing every other line? I attach a sample of the table and I wish to remove all the lines with 3651 under 'final' and 'max'.

6 REPLIES 6
jthi
Super User

Re: Editing rows in a large data table

I assume both of your columns are character columns, you can select both of those columns, right click on column header and create new formula column with concatenate

jthi_0-1768492226551.png

Then select one of those rows which has "3651 3651", right click, select matching cells and finally delete rows

jthi_1-1768492257095.png

jthi_2-1768492268258.png

 

-Jarmo
hartpjb
Level III

Re: Editing rows in a large data table

Thanks for your help. Very useful and just what I needed.

txnelson
Super User

Re: Editing rows in a large data table

The approach that I would use is similar to Jarmo's, however it does not require the creation of a new column.

  1. In row 1 for the column named [final], click on it's cell that has the value 3651.  The cell will then be highlighted
  2. In the same row, go to the Column named [max], hold down the CNTL key and click on the cell.
  3. Both cells will then be highlighted(selected)
  4. Move the pointer(mouse) the rowstate column for row 1, which will also be highlighted(selected)
  5. Right click on that cell and choose "Select Matching Cells".  All rows that have values of 3651 in columns [final] and [max] will be selected.
  6. Right click once again in the rowstate column for one of the selected rows, and choose, " Delete Rows"
Jim
BHarris
Level VII

Re: Editing rows in a large data table

Sounds like you got what you needed.  But in case someone comes here actually trying to just delete every other row, here's another way:

Create a new formula column with this formula:  Mod(Row(), 2)

Then click either the "0" or "1" in the header graph and then select Rows -> Delete Rows.

jthi
Super User

Re: Editing rows in a large data table

Similar thing can also be done by initializing data in new empty column

jthi_1-1768573822624.png

and you will end up with column with values 1,2,1,2,1,2,1,2. 

-Jarmo

Re: Editing rows in a large data table

It looks like there are many nice solutions here already. If you prefer to avoid adding dummy columns, Row Selection is another good option: 

christianz_0-1768576677054.png

You can use "Select Where" to grab rows based on one or multiple conditions. 

The "Row Selection" approach is a bit more generalizable in case of more complicated conditions for which rows to select. 

Recommended Articles