Closed louisfh closed 2 weeks ago
The CategoricalLabels class (new in upcoming 0.11.0 release, currently in develop
branch) fulfills this need to some extent, though we'll still sometimes use / allow dataframes with multi-index or with a specific set of columns.
The utility function generate_clip_times_df specifically says that it will produce clip_df: DataFrame with columns for 'start_time' and 'end_time' of each clip
and can be used in contexts without an associated file path, so I think its current behavior is correct.
The function generate_clip_df produces a dataframe that does not match our standard format of multi-index (file, start, end).
clip_df = generate_clip_times_df(3, clip_duration=1.0, clip_overlap=0.5)
More generally, I think we should think about a class that wraps the dataframes we use, that would enforce our standard format. It might be more opaque than just having a plain pandas.dataframe, but would avoid things like this.