Skip to content

Commit

Permalink
Fix dask usage in tutorial docs
Browse files Browse the repository at this point in the history
  • Loading branch information
amrit110 committed Nov 2, 2023
1 parent 9b5cce8 commit 32eefc1
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docs/source/tutorials/mimiciv.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@
"id": "9550ba62-c128-4259-a075-0cbd9c70b662",
"metadata": {},
"source": [
"## Example 7. Get all female patient encounters from year 2015, and return as dask dataframe (lazy evaluation) with 4 partitions (batches) aggregated based on `subject_id`."
"## Example 7. Get all female patient encounters from year 2015, and return batches partitioned and indexed on `subject_id`."
]
},
{
Expand All @@ -286,13 +286,12 @@
")\n",
"patient_admissions = patient_admissions.ops(ops)\n",
"patient_admissions = patient_admissions.run(\n",
" backend=\"dask\",\n",
" index_col=\"subject_id\",\n",
" n_partitions=4,\n",
" batch_mode=True,\n",
" batch_size=1000,\n",
")\n",
"print(f\"{len(patient_admissions)} rows extracted!\")\n",
"print(f\"Return type: {type(patient_admissions)}\")\n",
"print(f\"Number of partitions: {patient_admissions.npartitions}\")"
"patient_admissions_df = next(patient_admissions)\n",
"print(f\"{len(patient_admissions_df)} rows extracted!\")"
]
},
{
Expand Down

0 comments on commit 32eefc1

Please sign in to comment.