add

method of dascore.core.annotations.AnnotationSet source

add(
    self ,
    annotations = None,
    features = None,
    bases = None,
)-> ‘AnnotationSet’

Return a set with these tables appended.

Parameters

Parameter Description
annotations Rows to append; a feature_id may name an existing feature or
a new one, which is created as a group.
features Features rows to append.
bases Curves to add, keyed by name. A key already held must name the
same curve.

Examples

import pandas as pd
import dascore as dc
picks = dc.AnnotationSet(pd.DataFrame({"time": [1.0]}), dims=("time",))
more = picks.add(pd.DataFrame({"time": [2.0], "phase": ["S"]}))
len(picks), len(more)
(1, 2)