Skip to content

Commit 95ea246

Browse files
fix: low_memory=False on mimic-iv sqlite read_csv
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 4cf9855 commit 95ea246

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

mimic-iv/buildmimic/sqlite/import.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def main():
110110
if args.limit > 0:
111111
for f in data_files:
112112
if 'patients' in f.name:
113-
pt = pd.read_csv(f)
113+
pt = pd.read_csv(f, low_memory=False)
114114
break
115115
if pt is None:
116116
raise FileNotFoundError('Unable to find a patients file in current folder.')
@@ -158,7 +158,7 @@ def main():
158158
tablename = tablenames[i]
159159
print("Starting processing {}".format(tablename), end='.. ')
160160
if os.path.getsize(f) < THRESHOLD_SIZE:
161-
df = pd.read_csv(f, dtype=mimic_dtypes)
161+
df = pd.read_csv(f, dtype=mimic_dtypes, low_memory=False)
162162
df = process_dataframe(df, subjects=subjects)
163163
df.to_sql(tablename, connection, index=False)
164164
row_counts[tablename] += len(df)

0 commit comments

Comments
 (0)