Skip to content

Commit ca333dd

Browse files
committed
Fix dataset
1 parent 89e3173 commit ca333dd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

niaarm/dataset.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,16 @@ def __analyse_types(self):
3939
min_value = col.min()
4040
max_value = col.max()
4141
unique_categories = None
42+
elif col.dtype == 'bool':
43+
self.data[head] = self.data[head].astype(int)
44+
self.transactions = self.data.values
45+
dtype = 'int'
46+
min_value = 0
47+
max_value = 1
48+
unique_categories = None
4249
else:
4350
dtype = "cat"
44-
unique_categories = sorted(col.astype(str).unique().tolist(), key=str.lower)
51+
unique_categories = sorted(col.unique().tolist(), key=str.lower)
4552
min_value = None
4653
max_value = None
4754

0 commit comments

Comments
 (0)