else:
self._features = set(chain.from_iterable([tuple(u.keys())
for u in [*dict_features.values()]]))
- for csv_file in listdir():
- with open(csv_file, "r") as f:
- reader = DictReader(f, delimiter=',')
- dico_features = {{row['name']: row['type'] # qualitative (2) or quantitative (1)
- }
- for row in reader if row['name'] in self._features}
-
+ csv_files = Path.cwd() / 'config' / 'features'
self._features = {feat : None for feat in self._features}
+ for csv_file in listdir(csv_files):
+ with open(csv_files / csv_file, "r") as f:
+ reader = DictReader(f, delimiter=',')
+ for row in reader:
+ if row['name'] in self._features:
+ self._features[row['name']] = row['type']
print(self._features)
exit()