refactoring
This commit is contained in:
@@ -1352,15 +1352,17 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"def createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country):\n",
|
||||
"def createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country, minADRsForLethality = None):\n",
|
||||
" batchCodeTable = InternationalLotTableFactory.createBatchCodeTableByCountry(nonDomesticVaers, country)\n",
|
||||
" batchCodeTable = batchCodeTable[batchCodeTable['Total Number of Adverse Reaction Reports'] > 50]\n",
|
||||
" batchCodeTable.index.set_names(\"Batch\", inplace = True)\n",
|
||||
" if minADRsForLethality is not None:\n",
|
||||
" batchCodeTable.loc[batchCodeTable['Total Number of Adverse Reaction Reports'] < minADRsForLethality, 'Severe reports (%)'] = np.nan\n",
|
||||
" IOUtils.saveDataFrame(batchCodeTable, '../data/' + country)\n",
|
||||
" display(country + \":\", batchCodeTable)\n",
|
||||
"\n",
|
||||
"def createAndSaveAndDisplayBatchCodeTablesByCountry(nonDomesticVaers, countries):\n",
|
||||
"def createAndSaveAndDisplayBatchCodeTablesByCountry(nonDomesticVaers, countries, minADRsForLethality = None):\n",
|
||||
" for country in countries:\n",
|
||||
" createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country)"
|
||||
" createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country, minADRsForLethality)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -1385,7 +1387,8 @@
|
||||
" 'Sweden',\n",
|
||||
" 'Portugal',\n",
|
||||
" 'Australia'\n",
|
||||
" ])"
|
||||
" ],\n",
|
||||
" minADRsForLethality = 100)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user