Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mimic-iv/buildmimic/sqlite/import.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def main():
if args.limit > 0:
for f in data_files:
if 'patients' in f.name:
pt = pd.read_csv(f)
pt = pd.read_csv(f, low_memory=False)
break
if pt is None:
raise FileNotFoundError('Unable to find a patients file in current folder.')
Expand Down Expand Up @@ -158,7 +158,7 @@ def main():
tablename = tablenames[i]
print("Starting processing {}".format(tablename), end='.. ')
if os.path.getsize(f) < THRESHOLD_SIZE:
df = pd.read_csv(f, dtype=mimic_dtypes)
df = pd.read_csv(f, dtype=mimic_dtypes, low_memory=False)
df = process_dataframe(df, subjects=subjects)
df.to_sql(tablename, connection, index=False)
row_counts[tablename] += len(df)
Expand Down
Loading