Skip to content

IntervalsView #

Bases: object

A lazy view over node values

__eq__(value) #

Return self==value.

__ge__(value) #

Return self>=value.

__getitem__(key) #

Return self[key].

__gt__(value) #

Return self>value.

__iter__() #

Implement iter(self).

__le__(value) #

Return self<=value.

__len__() #

Return len(self).

__lt__(value) #

Return self<value.

__ne__(value) #

Return self!=value.

__repr__() #

Return repr(self).

arrow_compute() #

Compute all values and return the result as a OutputTypedNodeState

Returns:

Type Description
NodeStateIntervals

the computed OutputTypedNodeState

collect() #

Compute all values and return the result as a list

Returns:

Type Description
list[Intervals]

all values as a list

compute() #

Compute all values and return the result as a node view

Returns:

Type Description
NodeStateIntervals

the computed NodeState

get(node, default=None) #

Get value for node

Parameters:

Name Type Description Default
node NodeInput

the node

required
default Optional[Intervals]

the default value. Defaults to None.

None

Returns:

Type Description
Optional[Intervals]

the value for the node or the default value

items() #

Iterate over items

Returns:

Type Description
Iterator[Tuple[Node, Intervals]]

Iterator over items

max() #

Calculate the maximum interval in milliseconds for each node.

Returns:

Type Description
IntervalsIntegerView

A lazy view over the maximum interval between consecutive timestamps for each node. The maximum is None if there is fewer than 1 interval.

mean() #

Calculate the mean interval in milliseconds for each node.

Returns:

Type Description
IntervalsFloatView

A lazy view over the mean interval between consecutive timestamps for each node. The mean is None if there is fewer than 1 interval.

median() #

Calculate the median interval in milliseconds for each node.

Returns:

Type Description
IntervalsIntegerView

A lazy view over the median interval between consecutive timestamps for each node. The median is None if there is fewer than 1 interval.

min() #

Calculate the minimum interval in milliseconds for each node.

Returns:

Type Description
IntervalsIntegerView

A lazy view over the minimum interval between consecutive timestamps for each node. The minimum is None if there is fewer than 1 interval.

nodes() #

Iterate over nodes

Returns:

Type Description
Nodes

The nodes

sorted_by_id() #

Sort results by node id

Returns:

Type Description
NodeStateIntervals

The sorted node state

to_df() #

Convert results to pandas DataFrame

The DataFrame has two columns, "node" with the node ids and "value" with the corresponding values.

Returns:

Type Description
DataFrame

the pandas DataFrame

values() #

Iterate over values

Returns:

Type Description
Iterator[Intervals]

Iterator over values