crowsetta.formats.seq.generic.annot2df

Contents

crowsetta.formats.seq.generic.annot2df#

crowsetta.formats.seq.generic.annot2df(annot: Annotation | List[Annotation], abspath: bool = False, basename: bool = False) DataFrame[source]#

Convert sequence-like crowsetta.Annotation to a :type:`pandas.DataFrame` in the 'generic-seq' format.

Parameters:
  • annot (crowsetta.Annotation, or list of Annotations) –

  • csv_path (str, pathlib.Path) – Path including filename of csv file to write to, will be created (or overwritten if it exists already)

  • abspath (bool) – If True, converts filename for each audio file into absolute path. Default is False.

  • basename (bool) – If True, discard any information about path and just use file name. Default is False.

Notes

The abspath and basename parameters specify how file names for audio files are saved. These options are useful when working with multiple copies of files, and for reproducibility (so you know which copy of a file you were working with). Default for both is False, in which case the filename is saved just as it is passed to this function in a crowsetta.Sequence object.