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
ofdict
that can be made into aDataFrame
by callingpandas.DataFrame.from_records()
.- Parameters:
aud_txt_path (str, pathlib.Path) –
- Returns:
records – Of
dict
, eachdict
will become a row in theDataFrame
.- Return type:
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.