cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Due to the recently reported Microsoft outage, users may be temporarily unable to access My JMP or experience a delay receiving their verification codes. If you have previously installed JMP on your computer, this outage should not impact your ability to access the software. My JMP services will be restored as soon as Microsoft resolves this issue.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

How to distinguish whether there are empty values in a column?

I want to distinguish whether the cells in the column are empty using "is missing". In the JSL below, I hope to differentiate between the "name" and "Apple" fields, but the results are all 1. How should I modify it?

 

 dtTest = Open( "$SAMPLE_DATA/Big Class.jmp" );
 show(IsMissing(:age));
 dtTest << New Column( "Apple", "Character", "Nominal" );
 show(IsMissing(:Apple));
1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How to distinguish whether there are empty values in a column?

Check for 0 not for 1

Names Default To Here(1);

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

dt << New Column("Apple", "Character", "Nominal");
dt << New Column("Orange", Numeric, Continuous);


Show(Col Number(Column(dt, "age")) == 0);
Show(Col Number(Column(dt, "Apple")) == 0);
Show(Col Number(Column(dt, "Orange")) == 0);
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: How to distinguish whether there are empty values in a column?

Do you wish to check if all values are missing? You can for example use Col Number and check if it is 0

Names Default To Here(1);

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

dt << New Column("Apple", "Character", "Nominal");
dt << New Column("Orange", Numeric, Continuous);


Show(Col Number(Column(dt, "age")) == 1);
Show(Col Number(Column(dt, "Apple")) == 1);
Show(Col Number(Column(dt, "Orange")) == 1);
-Jarmo
BabyDoragon
Level IV

Re: How to distinguish whether there are empty values in a column?

I confirmed that all three results are displayed as 0, but in reality, the age field has a value. This makes it impossible to distinguish between the Apple and Orange fields.
jthi
Super User

Re: How to distinguish whether there are empty values in a column?

Check for 0 not for 1

Names Default To Here(1);

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

dt << New Column("Apple", "Character", "Nominal");
dt << New Column("Orange", Numeric, Continuous);


Show(Col Number(Column(dt, "age")) == 0);
Show(Col Number(Column(dt, "Apple")) == 0);
Show(Col Number(Column(dt, "Orange")) == 0);
-Jarmo

Recommended Articles