cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

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

Transpose column to rows and add Single quotation mark for each row

How can I use JSL to Transpose one column (:Number) to rows and add single quotation mark for each row? 

ReliabilityWolf_0-1717724919749.png

or add add single quotation mark for each row of "Number" column, then Transpose to row? 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
WebDesignesCrow
Super User

Re: Transpose column to rows and add Single quotation mark for each row

Hi @ReliabilityWolf 

Perhaps you can try this JSL script.

 

//To add prefix single quotation mark
Names Default to Here( 1 );
dt = current data table();
dt:Number << Data Type( Character);
for each row(
	dt:Number = "'" || dt:Number
);

//To transpose Number column to row
// Transpose data table
// → Data Table( "Transpose of dt" )
Data Table( "dt" ) << Transpose(
	columns( :Number ),
	Output Table( "Transpose of dt" )
);

View solution in original post

1 REPLY 1
WebDesignesCrow
Super User

Re: Transpose column to rows and add Single quotation mark for each row

Hi @ReliabilityWolf 

Perhaps you can try this JSL script.

 

//To add prefix single quotation mark
Names Default to Here( 1 );
dt = current data table();
dt:Number << Data Type( Character);
for each row(
	dt:Number = "'" || dt:Number
);

//To transpose Number column to row
// Transpose data table
// → Data Table( "Transpose of dt" )
Data Table( "dt" ) << Transpose(
	columns( :Number ),
	Output Table( "Transpose of dt" )
);

Recommended Articles