crowsetta.formats.bbox.audbbox.txt_to_records

Contents

crowsetta.formats.bbox.audbbox.txt_to_records#

crowsetta.formats.bbox.audbbox.txt_to_records(aud_txt_path: str | bytes | PathLike | Path) list[dict][source]#

Load a txt file in Audacity extended label track format into records for a :type:`pandas.DataFrame`.

Returns a list of dict that can be made into a DataFrame by calling pandas.DataFrame.from_records().

Parameters:

aud_txt_path (str, pathlib.Path) –

Returns:

records – Of dict, each dict will become a row in the DataFrame.

Return type:

list

Notes

We work with Audacity txt files this way, instead of loading with pandas.read_csv() then munging, so that we can be sure that we can round-trip data without corrupting it.