temporian.EventSet.filter_empty_index #
filter_empty_index() -> EventSetOrNode
Filters out indexes without events.
Usage example
>>> a = tp.event_set(
... timestamps=[1, 2, 3, 4],
... features={
... "i1": [1, 1, 2, 2],
... "f1": [10, 11, 12, 13],
... },
... indexes=["i1"]
... )
>>> filtered = a.filter(a["f1"] <= 11).filter_empty_index()
>>> filtered
indexes: [('i1', int64)]
features: [('f1', int64)]
events:
i1=1 (2 events):
timestamps: [1. 2.]
'f1': [10 11]
...
Returns:
Type | Description |
---|---|
EventSetOrNode
|
Filtered EventSet. |