refactoring
This commit is contained in:
@@ -1105,7 +1105,6 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# FK-TODO: make filter on 'Total reports' a parameter in getInternationalLotTable() \n",
|
||||
"internationalLotTable = internationalLotTable[internationalLotTable['Total reports'] > 50]\n",
|
||||
"saveDataFrameAsExcelFile(internationalLotTable, 'results/international/International_Deadly_Lots.xlsx')\n",
|
||||
"internationalLotTable"
|
||||
@@ -1118,11 +1117,39 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for country in ['United Kingdom', 'France', 'Germany', 'Japan', 'Italy', 'Austria', 'Netherlands', 'Spain', 'Belgium', 'Sweden', 'Portugal', 'Australia']:\n",
|
||||
"def createAndSaveAndDisplayBatchCodeTableByCountry(country):\n",
|
||||
" batchCodeTable = InternationalLotTableFactory.createBatchCodeTableByCountry(nonDomesticVaers, country)\n",
|
||||
" batchCodeTable = batchCodeTable[batchCodeTable['Total reports'] > 50]\n",
|
||||
" saveDataFrameAsExcelFile(batchCodeTable, 'results/international/' + country + '.xlsx')\n",
|
||||
" display(country + \":\", batchCodeTable)"
|
||||
" display(country + \":\", batchCodeTable)\n",
|
||||
"\n",
|
||||
"def createAndSaveAndDisplayBatchCodeTablesByCountry(countries):\n",
|
||||
" for country in countries:\n",
|
||||
" createAndSaveAndDisplayBatchCodeTableByCountry(country)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "7e7e01a5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"createAndSaveAndDisplayBatchCodeTablesByCountry(\n",
|
||||
" [\n",
|
||||
" 'United Kingdom',\n",
|
||||
" 'France',\n",
|
||||
" 'Germany',\n",
|
||||
" 'Japan',\n",
|
||||
" 'Italy',\n",
|
||||
" 'Austria',\n",
|
||||
" 'Netherlands',\n",
|
||||
" 'Spain',\n",
|
||||
" 'Belgium',\n",
|
||||
" 'Sweden',\n",
|
||||
" 'Portugal',\n",
|
||||
" 'Australia'\n",
|
||||
" ])"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user