annotation_set_to_dataframe

function of dascore.core.annotations source

annotation_set_to_dataframe(
    annotations: AnnotationSet ,
)-> ‘pd.DataFrame’

Return the annotations as a dataframe.

Reached as annotation_set.io.to_dataframe.

Parameters

Parameter Description
annotations The set to read.

Examples

import pandas as pd
import dascore as dc
frame = pd.DataFrame(
    {"group": ["event"], "distance_start": [10.0], "distance_end": [80.0]}
)
annotations = dc.AnnotationSet(frame, dims=("time", "distance"))
list(annotations.io.to_dataframe()["group"])
['event']