User Tools

Site Tools


transformations:sort

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
Next revisionBoth sides next revision
transformations:sort [2014/10/03 21:45] dmitrytransformations:sort [2015/04/10 15:52] elenap
Line 1: Line 1:
 ===== Sort ===== ===== Sort =====
  
-Sort table by one or more columns in ascending or descending order. Order of columns matters.+This transformation sorts the table by one or more columns in ascending or descending order. Order of the columns matters.
  
-Since values of a column can be of mixed types therefore sort order depends on value type. For ascending sort the order is following:+Since values of a column can be of mixed types, the sorting order depends on the value type. For ascending sorting, the order is the following:
   * Errors   * Errors
   * Empty cells   * Empty cells
Line 10: Line 10:
   * Numbers   * Numbers
  
-In descending order, the sort order is exactly opposite.+In descending order, the sorting order is exactly the opposite. 
 + 
 +EXAMPLE 
 + 
 +**Source table:** The longest rivers in the world 
 + 
 +^  River  ^  Length (km)  ^  Continent 
 +| Nile  |  6650  |  Africa 
 +| Amazon  |  6400  |  South America 
 +| Yangtze  |  6300  |  Asia  | 
 +| Mississippi  |  6275  |  North America 
 +| Yenisei  |  5539  |  Asia  | 
 +| Yellow River  |  5464  |  Asia  | 
 +| Ob  |  5410  |  Asia  | 
 +| Paraná  |  4880  |  South America 
 + 
 + 
 +**Objective:** Arrange the rivers in alphabetical order 
 + 
 +**Transformation parameters:** 
 + 
 +  * Column: River 
 +  * Sorting order: Ascending 
 +   
 +**Output table:** 
 + 
 +^  River  ^  Length (km)  ^  Continent 
 +| Amazon  |  6400  |  South America 
 +| Mississippi  |  6275  |  North America 
 +| Nile  |  6650  |  Africa 
 +| Ob  |  5410  |  Asia  | 
 +| Paraná  |  4880  |  South America 
 +| Yangtze  |  6300  |  Asia  | 
 +| Yellow River  |  5464  |  Asia  | 
 +| Yenisei  |  5539  |  Asia  | 
  
transformations/sort.txt · Last modified: 2021/07/18 23:13 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki