From 764d235b4d63f201abf7d20f6519577840371b20 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 21 Jun 2021 17:56:52 +0200 Subject: [PATCH] Rename populate dataframes to populate dataframe --- src/execution.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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