diff --git a/HowBadIsMyBatch.ipynb b/HowBadIsMyBatch.ipynb index d915aacb9a6..f15b0b72060 100644 --- a/HowBadIsMyBatch.ipynb +++ b/HowBadIsMyBatch.ipynb @@ -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", + " ])" ] } ],