diff --git a/src/execution.py b/src/execution.py index 0600038..28b4bb3 100644 --- a/src/execution.py +++ b/src/execution.py @@ -31,16 +31,16 @@ def process_output(results): return distances, time -def populate_dataframes(df, output_list, dataset): - df_distances, df_time = process_output(output_list) - df_dict = { +def populate_dataframe(df, output_list, dataset): + distances, time = process_output(output_list) + data_dict = { "dataset": dataset.removeprefix("data/"), - "media distancia": mean(df_distances), - "desviacion distancia": std(df_distances), - "media tiempo": mean(df_time), - "desviacion tiempo": std(df_time), + "media distancia": mean(distances), + "desviacion distancia": std(distances), + "media tiempo": mean(time), + "desviacion tiempo": std(time), } - df = df.append(df_dict, ignore_index=True) + df = df.append(data_dict, ignore_index=True) return df @@ -66,7 +66,7 @@ def script_execution(filenames, df_list, iterations=2): [executable, script, dataset, *params], capture_output=True ).stdout.splitlines() output_list.append(output_cmd) - populated_list.append(populate_dataframes(df, output_list, dataset)) + populated_list.append(populate_dataframe(df, output_list, dataset)) return populated_list