add_unique_id_to_results_dataframe#
- pepbench.data_handling.add_unique_id_to_results_dataframe(data: DataFrame, algo_levels: Sequence[str] | None = None) DataFrame[source]#
Add a unique ID to the results dataframe.
The unique ID is created by concatenating the values of the specified algorithm levels and the heartbeat IDs. This is then added as a new index level named “id_concat”.
- Parameters:
- data
pandas.DataFrame The results dataframe.
- algo_levelslist of str, optional
The algorithm levels to use for the unique ID. If None, the default algorithm levels ([“q_peak_algorithm”, “b_point_algorithm”, “outlier_correction_algorithm”]) are used.
- data
- Returns:
pandas.DataFrameThe results dataframe with the unique IDs added as new index level.
- Raises:
- ValidationError
If the input data is not a
pandas.DataFrame.