import pandas as pd
import dascore as dc
frame = pd.DataFrame(
{"time": [1.0, 2.0], "feature_id": ["event_1", None]}
)
ann = dc.AnnotationSet(frame, dims=("time",))
len(ann.remove(feature="event_1").annotations)1
| method of dascore.core.annotations.AnnotationSet | source |
remove(
self ,
feature = None,
annotation = None,
)-> ‘AnnotationSet’
Return a set without one feature or one annotation.
Removing a feature removes its members. Removing an annotation removes a group it leaves empty, and is refused where it leaves a path or polygon too few vertices.