Skip to main content

utils.get_aggregated_snippets_df

utils.get_aggregated_snippets_df(probe_level_dir)

Get a dataframe of metadata info for all snippets in the probe level directory.

This function scans a probe-level directory and aggregates metadata from all snippet subdirectories. It reads metadata from Parquet files (.parquet and .pqt) and combines them into a single DataFrame for analysis.

Args: probe_level_dir (Path): Path to the probe-level directory containing snippet subdirectories.

Returns: pd.DataFrame: DataFrame containing metadata from all snippets, with each row representing one snippet and columns representing different metadata attributes.

Note: The function looks for both .parquet and .pqt file extensions in each snippet directory. It extracts metadata from the DataFrame’s attrs dictionary and combines them across all snippets.