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

How do I sort data individually in a column when the data is given as a group?

The data I am looking at is movies and one of the columns is genres. However JMP has the genres that a particular movie is categorized under grouped as one data set "Fantasy|Horror|Romance|Thriller" rather than as individual movie genres "Fantasy", "Horror", "Romance", "Thriller". I want to separate the genre column so that I can analyze the genres individually. How would I clean the data so that when I go to sort the movies based on genre it gives me the individual genre rather than the grouped set?

 

2ae7a1f5682288af0a54faee2b558b68.png

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How do I sort data individually in a column when the data is given as a group?

Click on the column header for the column in question(genres).  Then go to the column pull down menu and select

     Cols=>Utilities=>Text to Columns

 

Fill out the simple dialog box that pops up to specify your "|"

txnelson_1-1648353801488.png

and click OK, and the different fields from the multiple field column will be separated into new columns.

txnelson_2-1648356183265.png

Note: This is a data table I just threw together.  The genres are just random values

 

Now just go to 

     Tables=>Stack

and stack all of the new genres columns

This will give you a table that actually will give you a nice way to select Genres.

txnelson_3-1648356385425.png

You can also go another step, and split the data

     Tables=>Split

Where you Split By the Genres column, Group by the Title column, and also specify the Genres column as the Split column

It will give you a data table like the one below

txnelson_4-1648356597287.png

If this doesn't meet your requirements, please specify what you want the data table to look like, and I am sure the Community can come up with an answer on how to transform your data.

 

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: How do I sort data individually in a column when the data is given as a group?

Click on the column header for the column in question(genres).  Then go to the column pull down menu and select

     Cols=>Utilities=>Text to Columns

 

Fill out the simple dialog box that pops up to specify your "|"

txnelson_1-1648353801488.png

and click OK, and the different fields from the multiple field column will be separated into new columns.

txnelson_2-1648356183265.png

Note: This is a data table I just threw together.  The genres are just random values

 

Now just go to 

     Tables=>Stack

and stack all of the new genres columns

This will give you a table that actually will give you a nice way to select Genres.

txnelson_3-1648356385425.png

You can also go another step, and split the data

     Tables=>Split

Where you Split By the Genres column, Group by the Title column, and also specify the Genres column as the Split column

It will give you a data table like the one below

txnelson_4-1648356597287.png

If this doesn't meet your requirements, please specify what you want the data table to look like, and I am sure the Community can come up with an answer on how to transform your data.

 

Jim

Recommended Articles