Often people will save segmentation in a csv file, e.g. from a pandas.DataFrame.
This segmentation won't necessarily have labels with it -- they just applied some signal processing algorithm to segment.
We should make it easy to work with this segmentation, without having to modify the csv file.
One way to do this is to provide a default label for all segments.
We should add some arg to from_file like default_label that defaults to '-' or some other single character, that can be changed. The from_file function should check if there is a labels column in the csv file, and if not, it should add a column with the default label for every row.
Often people will save segmentation in a csv file, e.g. from a
pandas.DataFrame
.This segmentation won't necessarily have labels with it -- they just applied some signal processing algorithm to segment.
We should make it easy to work with this segmentation, without having to modify the csv file.
One way to do this is to provide a default label for all segments.
We should add some arg to
from_file
likedefault_label
that defaults to'-'
or some other single character, that can be changed. Thefrom_file
function should check if there is alabels
column in the csv file, and if not, it should add a column with the default label for every row.