Row Operations
11 nodes
On this page 11
Drop Empty Rows
FunctionThe rows with empty cells removed: a row goes when any of the chosen columns (every column when none are chosen) is empty - or, with All Empty, only when every one of them is. Text that is only spaces counts as empty here.
DropEmptyRows -> Table
table: Table
columns: Text Array
allEmpty: TruthTable DropEmptyRows(
Table table,
string[] columns,
bool allEmpty = false)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to clean. |
| columns | Text Array | — | The columns to look at; every column when empty. |
| allEmpty | Truth | False | Whether a row goes only when all of those columns are empty. |
Returns
| Table | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Filter By Formula
FunctionThe rows for which a formula holds - Region = "West" and Units > 10 - and, on the second output, the rows for which it does not.
FilterByFormula -> (Matching: Table, notMatching: Table)
table: Table
formula: Text
x: Any
y: AnyTable FilterByFormula(
Table table,
string formula,
object x,
object y,
out Table notMatching)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to filter. |
| formula | Text | — | The condition, as a formula. |
| x | Any | — | A value the formula can use as $x. |
| y | Any | — | A value the formula can use as $y. |
Returns
| Matching | Table |
| notMatching | Table |
Remarks
A row passes unless the formula gives false, an empty value, zero or empty text. Columns are named bare or in brackets ([Unit Price]); $x and $y are the values wired into X and Y. See Formula Column for the functions a formula can use.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Filter By Truths
FunctionThe rows where a column of truths is true - a condition built from other nodes - and, on the second output, the rest.
FilterByTruths -> (Matching: Table, notMatching: Table)
table: Table
keep: ColumnTable FilterByTruths(
Table table,
Column keep,
out Table notMatching)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to filter. |
| keep | Column | — | A Truth column as long as the table: true keeps a row. |
Returns
| Matching | Table |
| notMatching | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Filter Rows
FunctionThe rows whose value in a column passes a comparison - equals, is greater than, contains, is one of and the rest - and, on the second output, the rows that do not.
FilterRows -> (Matching: Table, notMatching: Table)
table: Table
column: Text
comparison: Filter Operator
value: Text
matchCase: TruthTable FilterRows(
Table table,
string column,
FilterOperator comparison,
string value,
bool matchCase,
out Table notMatching)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to filter. |
| column | Text | — | The column to test. |
| comparison | Filter Operator | — | How the column is compared with the value. |
| value | Text | — | What the column is compared with; for "is one of", values separated by commas. |
| matchCase | Truth | — | Whether text must match in letter case too. |
Returns
| Matching | Table |
| notMatching | Table |
Remarks
A column of numbers compares as numbers and a column of dates as dates, so "Price is greater than 10" and "Date is at least 2025-01-01" mean what they say. Text compares ignoring letter case unless Match Case is on. An empty cell matches only "is empty" and the negative comparisons.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Random Sample
FunctionA random sample of rows, kept in their original order. The same seed draws the same rows every time - and the same rows Divooka Lite's Random Sample draws.
RandomSample -> Table
table: Table
count: Integer
seed: NumberTable RandomSample(
Table table,
int count = 100,
double seed = 42)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to sample. |
| count | Integer | 100 | How many rows; a table with no more rows than this is returned whole. |
| seed | Number | 42 | Which sample: change it for another. |
Returns
| Table | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Remove Duplicates
FunctionThe rows with duplicates removed: a row is a duplicate when its values in the chosen columns (every column when none are chosen) repeat an earlier row's.
RemoveDuplicates -> Table
table: Table
columns: Text Array
keepLast: TruthTable RemoveDuplicates(
Table table,
string[] columns,
bool keepLast = false)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to de-duplicate. |
| columns | Text Array | — | The columns that decide what is a duplicate; every column when empty. |
| keepLast | Truth | False | Whether to keep the last of each set of duplicates instead of the first. |
Returns
| Table | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Shuffle Rows
FunctionThe rows in a random order; the same seed gives the same order.
ShuffleRows(table: Table, seed: Number) -> Table
Table ShuffleRows(Table table, double seed = 42)
Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to shuffle. |
| seed | Number | 42 | Which order: change it for another. |
Returns
| Table | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Sort Rows
FunctionThe rows in order of one or more columns: the first column decides, the next breaks its ties, and so on. Empty values go last whichever way a column sorts, and rows that tie keep their order.
SortRows -> Table
table: Table
columns: Text Array
descending: Truth ArrayTable SortRows(Table table, string[] columns, bool[] descending)
Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to sort. |
| columns | Text Array | — | The columns to sort by, most important first. |
| descending | Truth Array | — | For each column, whether it sorts largest first; ascending where not given. |
Returns
| Table | Table |
Remarks
Text sorts naturally - "item2" before "item10", letter case aside.
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Split Rows
FunctionThe rows split at random into two parts - Fraction of them in the first, the rest in the second - as training and test sets are made. Each part keeps the table's order.
SplitRows -> (Part: Table, rest: Table)
table: Table
fraction: Number
seed: NumberTable SplitRows(
Table table,
double fraction,
double seed,
out Table rest)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to split. |
| fraction | Number | — | The share of rows in the first part, between 0 and 1. |
| seed | Number | — | Which split: change it for another. |
Returns
| Part | Table |
| rest | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Take Rows
FunctionSome rows by position: the first Count rows after skipping Skip of them, or - from the end - the last Count rows before the last Skip. A negative Count takes every row after the skip.
TakeRows -> Table
table: Table
count: Integer
skip: Integer
fromEnd: TruthTable TakeRows(
Table table,
int count = 10,
int skip = 0,
bool fromEnd = false)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to take from. |
| count | Integer | 10 | How many rows; negative for all of them. |
| skip | Integer | 0 | How many rows to pass over first. |
| fromEnd | Truth | False | Whether to count from the last row instead of the first. |
Returns
| Table | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics
Top N
FunctionThe rows with the largest - or smallest - values of a column, largest first.
TopN -> Table
table: Table
column: Text
count: Integer
smallest: TruthTable TopN(
Table table,
string column,
int count = 10,
bool smallest = false)Parameters
| name | type | default | description |
|---|---|---|---|
| table | Table | — | The rows to choose from. |
| column | Text | — | The column to rank by. |
| count | Integer | 10 | How many rows. |
| smallest | Truth | False | Whether to take the smallest values instead, smallest first. |
Returns
| Table | Table |
- Ships with
- Divooka ExploreDivooka Compute
- Graph kinds
- Flows Function Events Routine Constructs StateMachineState
- Declared by
- Row Operations
- Package
- Data Analytics