table process columns, table process selected columns
The function table process columns iterates through all columns from left to right, similarly to for all table columns(__).
The function table process selected columns iterates through all columns from left to right and processes them, if the condition expression is true.
This feature works very similarly as table process selected rows(), but in the horizontal direction from left to right.
The width of the header row does primarily determine the loop from left to right to process the columns. The loop may be extended if
column numbers beyond the last header are specified.
For this function, the enabled partial table specifications also includes referencing the current column number by simply specifying a '.' (point)
and you can use the function col() to retrieve the current column number.
Indirect parameter passing is disabled
This function provides a table context for partial table specifications with table name, row number and column number for selected function parameters
3-5
No. | Type | Description |
---|---|---|
1. input |
string | Name of existing table |
2. input |
numeral | Row number The specified row number will be used as current row when executing expressions and statements below using partial table specifications. |
Opt. 3. code |
expression :string |
Expression to select columns Applicable to table process selected columnss only: |
3. / 4. code |
statements :string |
Statements (applicable where columns are selected) table process columns: The statements provided will be executed once for every column. |
5. code |
statements :string |
Statements (otherwise) table process columns: Not applicable. This function accepts 3 parameters only.
table process selected columns: The statements provided will be executed once for every cell in every row where the condition calculated for that row returned false. |
Type | Description |
---|---|
numeral | Number of cells processed With table process selected rows, the number of selected rows (and processed with statements from 3rd function parameter) are counted. |
table load( cities, "Examples\Cities.csv" );
table process columns ( cities, 4, if (!is numeric([.])) [.] += '!' ); // ! after text items
table process selected columns ( cities, 4, [.,0]=="City", [.] = +[.] ); // City upper case
table process selected columns ( cities, 5, {0..2}, [.] = +[.] ); // Row 5, coluns 0..2 upper ase
// Copies 'Little Mermaid' (next row below) from Copenhagen to Montréal
table process selected columns ( cities, 6, 4, [.] = [.,row()+1] );
table list ( cities );
0 : Country | City | State/Province | Inhabitants | Famous attraction | Alt. (m) | Famous cultural place | Moving along
1 : USA | New York City | New York | 8300000 | St. of Liberty | 10 | Guggenheim | Taxi
2 : USA | Washington | D.C. | 650000 | Lincoln Statue | 7 | Smithsonian Inst. | The Beast
3 : USA | Philadelphia | Pennsylvania | 1500000 | Independence hall | 12 | | PCC streetcar
4 : USA! | BOSTON! | Massachusetts! | 620000 | Freedom trail! | 43 | ! | Walking!
5 : USA | SAN FRANCISCO | CALIFORNIA | 805000 | Golden Gate | 16 | SFMOMA | Cable car
6 : CAN | Montréal | Quebec | 1700000 | Little Mermaid | | Rialto Theater | Skidoo
7 : DAN | Copenhagen | Hovedstaten | 580000 | Little Mermaid | 24 | Royal Theater | Bicycle
8 : ITA | Venice | Venetia | 260000 | Doge's Palace | 1 | Theatro la Fenice | Gondola
9 : USA | Los Angeles | California | 3800000 | Hollywood | 100 | Getty Center | Car
10 : AUT | Vienna | | 1800000 | Prater | | Opera | Fiacre
11 : THA | Bangkok | | 8250000 | Wat Phra Kaeo | 5 | National Museum | Longtail boat
12 : SWI | Zürich | Kt. Zürich | 404000 | Street Parade | 408 | Kunsthaus | Tram
13 : FRA | Paris | Île de France | 2240000 | Eiffel Tower | | Louvre | Métro
14 : SWI | Davos | Grisons | 11000 | Weissfluhgipfel | 1650 | Kirchner Museum | Ski lift
table process rows
table process selected rows
table process cells
table process cells selected rows