cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar

How do I assign a new column with categorical data which is defined by specific tag words contained in another column of my data?

Hi Community,

 

I have a set of data, containing a column with part nr and a column with varying descriptions of the corresponding numbers.

Based on that data, I want to add another column, that automatically labels all rows which contain "WORD" in the description column as 1, the others as 0. 

 

VariancePanther_0-1698396833553.png

What is the best way to do this?

Thx in advance

2 ACCEPTED SOLUTIONS

Accepted Solutions
Ressel
Level VI

Re: How do I assign a new column with categorical data which is defined by specific tag words contained in another column of my data?

See if the attached example is what you want. It contains a formula column in column "WORD?" that looks like this:

Ressel_0-1698397601504.png

You should be able to change the string ("WORD") to any other string to match your search criteria. Respond, if you need more help.

View solution in original post

jthi
Super User

Re: How do I assign a new column with categorical data which is defined by specific tag words contained in another column of my data?

Contains(:Description, "WORD") > 0

Formula column with above formula using Contains() 

-Jarmo

View solution in original post

2 REPLIES 2
Ressel
Level VI

Re: How do I assign a new column with categorical data which is defined by specific tag words contained in another column of my data?

See if the attached example is what you want. It contains a formula column in column "WORD?" that looks like this:

Ressel_0-1698397601504.png

You should be able to change the string ("WORD") to any other string to match your search criteria. Respond, if you need more help.

jthi
Super User

Re: How do I assign a new column with categorical data which is defined by specific tag words contained in another column of my data?

Contains(:Description, "WORD") > 0

Formula column with above formula using Contains() 

-Jarmo