User Tools

Site Tools


transformations:filter

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:filter [2015/03/20 21:33] elenaptransformations:filter [2015/04/10 11:29] elenap
Line 1: Line 1:
 ===== Filter by Condition ===== ===== Filter by Condition =====
  
-This transformation calculates an [[syntax:start|expression]] for every row (without adding a new column) and leaves only rows where this expression is true. Other rows are removed.+This transformation calculates an [[syntax:start|expression]] for every row (without adding a new column) and keeps only rows where this expression is true. Other rows are removed.
  
 The expression should be logical and return a boolean value (i.e. either true or false). The expression should be logical and return a boolean value (i.e. either true or false).
Line 16: Line 16:
  
 If no rows satisfy the condition then all rows get removed. If no rows satisfy the condition then all rows get removed.
 +
 +**Example of transformation**
 +
 +**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:** Find all rivers that are longer than 6000 km
 +
 +**Transformation parameters:**
 +
 +  * Column: Length (km)
 +  * Expression: [Length (km)] > 6000
 +
 +**Output table:**
 +
 +^  River  ^  Length (km)  ^  Continent  ^
 +| Nile  |  6650  |  Africa  |
 +| Amazon  |  6400  |  South America  |
 +| Yangtze  |  6300  |  Asia  |
 +| Mississippi  |  6275  |  North America  |
 +
 +=== See also ===
 +  * [[transformations:selectionfilter|Filter]]
 +
transformations/filter.txt · Last modified: 2024/03/07 10:22 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki