cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

Discussions

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

Delete selected data in the cell

Hello

I have table and I would like to delete specific data in cell.

for example with this condition as well:

1) if CORNER = VMAX

2) if MODUL = IIH

3) if PARAMETR = GPIO & MIPI

4) if LO_LIMIT is not 0

Delete the data of LO_LIMIT for these criteria  

Dennisbur_0-1676967852180.png

at the end I would like to receive data table

Dennisbur_1-1676968106179.png

can you assist me in JSL script for this task?

1 REPLY 1
jthi
Super User

Re: Delete selected data in the cell

Build your condition statements and combine them with and/or. Then get rows of interest and use that to clear rows. Below are few a bit different options

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

//option1
rows_to_set_missing = dt << Get Rows Where(:age >= 13 & :sex == "F" &  :weight < 100);
If(N Rows(rows_to_set_missing) > 0,
	dt[rows_to_set_missing, "weight"] = .;
);	

stop();
// option2
Column(dt, "weight") << Set Each Value(
	If(:age >= 13 & :sex == "F" &  :weight < 100,
		.
	,
		:weight
	);
);

-Jarmo

Recommended Articles