Slice data Table

../../../../_images/select_table_rows1.svg

Slice the rows in Tables or elements in lists of Tables or ADAFs.

The slice pattern is expressed with standard Python syntax, [start:stop:step]. See example below to get a clear view how it works for a list.

>>> li = ['elem0', 'elem1', 'elem2', 'elem3', 'elem4']
>>> li[1:3]
['elem1', 'elem2']
>>> li[1:-1]
['elem1', 'elem2', 'elem3']
>>> li[0:3]
['elem0', 'elem1', 'elem2']
>>> li[:3]
['elem0', 'elem1', 'elem2']
>>> li[3:]
['elem3', 'elem4']
>>> li[:]
['elem0', 'elem1', 'elem2', 'elem3', 'elem4']
>>> li[::2]
['elem0', 'elem2', 'elem4']
>>> li[:4:2]
['elem0', 'elem2']
>>> li[1::2]
['elem1', 'elem3']
class node_slice.SliceDataTable[source]

Slice rows in Table.

Inputs:
InTable
: Table

Table with data.

Outputs:
OutTable
: Table

Table consisting of the rows that been sliced out from the incoming Table according to the defined pattern. The number of columns are conserved during the slice operation.

Configuration:
Slice

Use standard Python syntax to define pattern for slice operation, [start:stop:step].

Limit preview to

Specify the maximum number of rows in the preview table.

Preview
: Button

Push to visualise the effect of the defined slice.

Opposite node:
Ref. nodes:

Slice data Tables