Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kirbyju committed Sep 26, 2024
1 parent 5f92bff commit 493d82f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions TCIA_Series_UID_Report.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,12 @@
"cell_type": "code",
"source": [
"# assess all collections\n",
"collections = nbia.getCollections(format = \"df\")"
"collections = nbia.getCollections()\n",
"\n",
"# convert the Collection values in the json output to a list\n",
"collections = [collection['Collection'] for collection in collections]\n",
"\n",
"print(len(collections), \"collections were selected.\")"
],
"metadata": {
"id": "PuS-2Rh3BVbO"
Expand Down Expand Up @@ -379,7 +384,7 @@
"series = pd.DataFrame()\n",
"\n",
"for collection in collections:\n",
" seriesDescription = nbia.getSeries(collection, api_url = \"restricted\")\n",
" seriesDescription = nbia.getSeries(collection)\n",
" series = pd.concat([series, pd.DataFrame(seriesDescription)], ignore_index=True)\n",
"\n",
"series.to_csv('series_metadata_{}.csv'.format(datetime.date.today()))"
Expand Down

0 comments on commit 493d82f

Please sign in to comment.