refactoring

This commit is contained in:
frankknoll
2022-02-08 18:00:10 +01:00
parent 00c6f942b0
commit 55f8f2c2ee

View File

@@ -1117,15 +1117,15 @@
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"def createAndSaveAndDisplayBatchCodeTableByCountry(country):\n", "def createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country):\n",
" batchCodeTable = InternationalLotTableFactory.createBatchCodeTableByCountry(nonDomesticVaers, country)\n", " batchCodeTable = InternationalLotTableFactory.createBatchCodeTableByCountry(nonDomesticVaers, country)\n",
" batchCodeTable = batchCodeTable[batchCodeTable['Total reports'] > 50]\n", " batchCodeTable = batchCodeTable[batchCodeTable['Total reports'] > 50]\n",
" saveDataFrameAsExcelFile(batchCodeTable, 'results/international/' + country + '.xlsx')\n", " saveDataFrameAsExcelFile(batchCodeTable, 'results/international/' + country + '.xlsx')\n",
" display(country + \":\", batchCodeTable)\n", " display(country + \":\", batchCodeTable)\n",
"\n", "\n",
"def createAndSaveAndDisplayBatchCodeTablesByCountry(countries):\n", "def createAndSaveAndDisplayBatchCodeTablesByCountry(nonDomesticVaers, countries):\n",
" for country in countries:\n", " for country in countries:\n",
" createAndSaveAndDisplayBatchCodeTableByCountry(country)" " createAndSaveAndDisplayBatchCodeTableByCountry(nonDomesticVaers, country)"
] ]
}, },
{ {
@@ -1136,6 +1136,7 @@
"outputs": [], "outputs": [],
"source": [ "source": [
"createAndSaveAndDisplayBatchCodeTablesByCountry(\n", "createAndSaveAndDisplayBatchCodeTablesByCountry(\n",
" nonDomesticVaers,\n",
" [\n", " [\n",
" 'United Kingdom',\n", " 'United Kingdom',\n",
" 'France',\n", " 'France',\n",