User Tools

Site Tools


transformations:labelcolumns

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
transformations:labelcolumns [2015/10/01 22:37] dmitrytransformations:labelcolumns [2021/07/19 02:24] (current) – [Examples] craigt
Line 1: Line 1:
-===== Label columns =====+{{ transformations:LabelColumnsAction.png}} 
 +====== LABEL COLUMNS ====== 
 +Category: Transform / Advanced \\
  
-This transformation creates column name using one or more top values of that column. It can be used for parsing data in spreadsheets with multi-line column headers.+\\  
 +=====Description===== 
 +This action creates column names using one or more top rows in the dataset.\\
  
-**Example**+\\ 
 +=====Use cases===== 
 +This action can be used for parsing data in spreadsheets with multi-line column headers.  Import spreadsheets //without// column headers (so they appear as top-row records) and use this action to convert them into column names.\\
  
-Before transformation+ 
 +\\  
 +=====Action settings===== 
 +^Setting^Description^ 
 +|Use top (# of rows)|Enter or select the number of top rows to use for creating column names.| 
 +|Separator|Select the character to be used to separate the values pulled from the top rows when more than one row is selected.\\  Options:  //Comma//, //Semicolon//, //Tab//, //Pipe//, //Tilde//, //Space//, and //No separator//.| 
 +|Rename|Select whether to rename all columns, or selected columns.  Options: //All columns// or //Selected columns// (choose the\\ columns to rename).| 
 + 
 +\\  
 +=====Remarks===== 
 +When selecting more than one top row, values in those rows will be concatenated using the separator character chosen. 
 + 
 +When not selecting all columns to be renamed, any values in the columns //not selected// will be lost from the rows used for column names.\\ 
 + 
 +\\  
 +=====Examples===== 
 + 
 +**Example:** Use the top 3 rows to create column headings.\\ 
 + 
 +**Source dataset:**
 ^Column1  ^Column2  ^ ^Column1  ^Column2  ^
 |State     |Sales  | |State     |Sales  |
Line 13: Line 38:
 |British Columbia  | 1500| |British Columbia  | 1500|
 |Quebec    |    2000| |Quebec    |    2000|
 +\\ 
 +**Action parameters:**
 +> Use top "3" rows
 +> Separator is "Space"
 +> All columns are renamed
  
-After applying the transformation for top 3 rows: +\\  
 +**Result table:**
 ^State or province  ^Sales in 2015  ^ ^State or province  ^Sales in 2015  ^
 |Ontario  | 1000| |Ontario  | 1000|
Line 21: Line 51:
 |Quebec  |    2000| |Quebec  |    2000|
  
-Not that in EasyMorph you can import data from spreadsheets without creating column headers from top row.+\\  
 +====Community examples==== 
 +  * [[https://community.easymorph.com/t//1351/1|How to order columns by a list of columns]] ([[https://community.easymorph.com/uploads/short-url/bKeuXUgwKo1alDrA03LY5z3tPJv.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Reordered columns//; Action position: //4//) 
 +  * [[https://community.easymorph.com/t//1482/6|Pivot tables basis data]] ([[https://community.easymorph.com/uploads/short-url/dkfcbulAExEaMObhjxprjxXdqtE.morph|Project]]; Module: //Main//; Group: //Tab 1//; Table: //Table 1//; Action position: //2//) 
 +  * [[https://community.easymorph.com/t//1625/4|Create a new table with columns based on row values]] ([[https://community.easymorph.com/uploads/short-url/4oGLUNDHrUfB971H80ciuOAtOTG.morph|Project]]; Module: //Module 1//; Group: //Tab 1//; Table: //Table 1//; Action position: //6//) 
 +  * [[https://community.easymorph.com/t//1926/3|Sort column in an export alphabetically (tab)]] ([[https://community.easymorph.com/uploads/short-url/b1cFUp2TMl0yEassYLlT4oO3hxp.morph|Project]]; Module: //Main//; Group: //Enum/pivot/append//; Table: //Template table to append to//; Action position: //4//) 
 + 
 +\\  
 +=====See also===== 
 +  *[[transformations:rename|Rename columns]] 
 +  *[[transformations:lookuprename|Rename columns with lookup]]
transformations/labelcolumns.1443753448.txt.gz · Last modified: 2015/10/01 22:37 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki