Commit f3c5656e authored by Anze Vavpetic's avatar Anze Vavpetic
Browse files

swapped arff library

parent 70c92475
......@@ -44,11 +44,10 @@ def weka_get_attr_list(input_dict):
arff_file = input_dict['arff_file']
attr_name = input_dict.get('attr_name', None)
attr_list = []
for row in arff.loads(arff_file):
if attr_name:
attr = getattr(row, attr_name)
# Default to last row value
attr = row[len(row)-1]
dataset = arff.loads(arff_file)
attr_idx = -1
if attr_name:
attr_idx = map(lambda x: x[0], dataset['attributes'].index(attr_name))
for row in dataset['data']:
return {'attr_list': attr_list}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment