Skip to content

temporian.input_node #

input_node(
    features: List[Tuple[str, DType]],
    indexes: Optional[List[Tuple[str, IndexDType]]] = None,
    is_unix_timestamp: bool = False,
    same_sampling_as: Optional[EventSetNode] = None,
    name: Optional[str] = None,
) -> EventSetNode

Creates an input EventSetNode.

An input EventSetNode can be used to feed data into a graph.

Usage example:

```python
>>> # Without index
>>> a = tp.input_node(features=[("f1", tp.float64), ("f2", tp.str_)])

>>> # With an index
>>> a = tp.input_node(
...     features=[("f1", tp.float64), ("f2", tp.str_)],
...     indexes=["f2"],
... )

>>> # Two nodes with the same sampling
>>> a = tp.input_node(features=[("f1", tp.float64)])
>>> b = tp.input_node(features=[("f2", tp.float64)], same_sampling_as=a)

```

Parameters:

Name Type Description Default
features List[Tuple[str, DType]]

List of names and dtypes of the features.

required
indexes Optional[List[Tuple[str, IndexDType]]]

List of names and dtypes of the index. If empty, the data is assumed not indexed.

None
is_unix_timestamp bool

If true, the timestamps are interpreted as unix timestamps in seconds.

False
same_sampling_as Optional[EventSetNode]

If set, the created EventSetNode is guaranteed to have the same sampling as same_sampling_as. In this case,indexesandis_unix_timestamp` should not be provided. Some operators require for input EventSetNodes to have the same sampling.

None
name Optional[str]

Name for the EventSetNode.

None

Returns:

Type Description
EventSetNode

EventSetNode with the given specifications.