-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCreateResultsTable.py
More file actions
39 lines (32 loc) · 1.1 KB
/
CreateResultsTable.py
File metadata and controls
39 lines (32 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import argparse
import sys
sys.path.append('..')
from AllFnc.utilities import gather_results
if __name__ == '__main__':
help_d = """
CreateResultsTable gathers the results stored in all pickle files into a
unique Pandas DataFrame, which is stored in a csv file with
default name 'ResultsTable.csv'.
A custom name can be given in input as well.
Example:
$ python3 CreateResultsTable.csv -n CustomName.csv
"""
parser = argparse.ArgumentParser(description=help_d)
parser.add_argument(
"-n",
"--name",
dest = "filename",
metavar = "csv filename",
type = str,
nargs = '?',
required = False,
default = None,
help = """
The results filename. it should include the .csv extension at the end.
However, the function can handle its absence.
""",
)
# basically we overwrite the dataPath if something was given
args = vars(parser.parse_args())
FilenameInput = args['filename']
gather_results(save = True, filename = FilenameInput)