temporian.EventSet.prefix #
prefix(prefix: str) -> EventSetOrNode
Adds a prefix to the names of the features in an
EventSet
.
Usage example
>>> a = tp.event_set(
... timestamps=[0, 1],
... features={"f1": [0, 2], "f2": [5, 6]}
... )
>>> b = a * 5
>>> # Prefix before glue to avoid duplicated names
>>> c = tp.glue(a.prefix("original_"), b.prefix("result_"))
>>> c
indexes: ...
'original_f1': [0 2]
'original_f2': [5 6]
'result_f1': [ 0 10]
'result_f2': [25 30]
...
Parameters:
Name | Type | Description | Default |
---|---|---|---|
prefix |
str
|
Prefix to add in front of the feature names. |
required |
Returns:
Type | Description |
---|---|
EventSetOrNode
|
Prefixed EventSet. |