add_path

method of dascore.core.annotations.AnnotationSet source

add_path(
    self ,
    id: str ,
    basis = None,
    members = None,
    **columns ,
)

Return a set with one more path; see add_feature.

Examples

import dascore as dc
empty = dc.AnnotationSet(dims=("time", "distance"))
train = empty.add_path(
    "train_1",
    time=[0.0, 10.0, 20.0],
    distance=[0.0, 150.0, 300.0],
    vehicle_type="train",
)
train["train_1"].kind
'path'