temporian.EventSet.lag #
lag(duration: Duration) -> EventSetOrNode
Adds a delay to an EventSet
's timestamps.
In other words, shifts the timestamp values forwards in time.
Usage example
>>> a = tp.event_set(
... timestamps=[0, 1, 5, 6],
... features={"value": [0, 1, 5, 6]},
... )
>>> b = a.lag(tp.duration.seconds(2))
>>> b
indexes: ...
(4 events):
timestamps: [2. 3. 7. 8.]
'value': [0 1 5 6]
...
Parameters:
Name | Type | Description | Default |
---|---|---|---|
duration |
Duration
|
Duration to lag by. |
required |
Returns:
Type | Description |
---|---|
EventSetOrNode
|
Lagged EventSet. |