Rename populate dataframes to populate dataframe

This commit is contained in:
coolneng 2021-06-21 17:56:52 +02:00
parent 7cbb25c546
commit 764d235b4d
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
1 changed files with 9 additions and 9 deletions

View File

@ -31,16 +31,16 @@ def process_output(results):
return distances, time return distances, time
def populate_dataframes(df, output_list, dataset): def populate_dataframe(df, output_list, dataset):
df_distances, df_time = process_output(output_list) distances, time = process_output(output_list)
df_dict = { data_dict = {
"dataset": dataset.removeprefix("data/"), "dataset": dataset.removeprefix("data/"),
"media distancia": mean(df_distances), "media distancia": mean(distances),
"desviacion distancia": std(df_distances), "desviacion distancia": std(distances),
"media tiempo": mean(df_time), "media tiempo": mean(time),
"desviacion tiempo": std(df_time), "desviacion tiempo": std(time),
} }
df = df.append(df_dict, ignore_index=True) df = df.append(data_dict, ignore_index=True)
return df return df
@ -66,7 +66,7 @@ def script_execution(filenames, df_list, iterations=2):
[executable, script, dataset, *params], capture_output=True [executable, script, dataset, *params], capture_output=True
).stdout.splitlines() ).stdout.splitlines()
output_list.append(output_cmd) 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 return populated_list