-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtableGen.py
More file actions
36 lines (28 loc) · 795 Bytes
/
tableGen.py
File metadata and controls
36 lines (28 loc) · 795 Bytes
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
import numpy as np
import pandas as pd
import json
def createTable(CONFIG):
with open(CONFIG,'r') as fR:
config = json.load(fR)
header = [key for key in config['wordEmbConfig']]
print(header)
index1 = []
index2 = []
for cD in config["cogDataConfig"]:
for feature in config["cogDataConfig"][cD]["features"]:
index1.append(cD)
index2.append(feature)
index = [index1,index2]
setup = {header[j]:[np.NaN for i in range(len(index2)) ] for j in range(len(header))}
df = pd.DataFrame(setup,index)
print(df)
pass
def fillTable(PATH, table):
pass
def main():
OPTIONS = "../test_final/options.json"
CONFIG = "../config/setupConfig.json"
createTable(CONFIG)
pass
if __name__=="__main__":
main()