Browse Source

Update preprocessing

Ali Bellamine 2 years ago
parent
commit
2a7b105b14
1 changed files with 3 additions and 1 deletions
  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