浏览代码

Update preprocessing

Ali Bellamine 2 年之前
父节点
当前提交
2a7b105b14
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      bop_scripts/preprocessing.py

+ 3 - 1
bop_scripts/preprocessing.py

@@ -164,7 +164,9 @@ def generate_labels_dataset(database, lab_dictionnary):
     lab_dictionnary_list = [str(x) for x in lab_dictionnary.keys()]
 
     ## Let's create an index to speed up queries
-    conn.execute("CREATE INDEX IF NOT EXISTS biological_index ON labevents (stay_id, itemid)")
+    curs = conn.cursor()
+    curs.execute("CREATE INDEX IF NOT EXISTS biological_index ON labevents (stay_id, itemid)")
+    curs.close()
 
     # 1. Generating features