refactoring
This commit is contained in:
@@ -1165,6 +1165,14 @@
|
||||
"#### Pfizer Batches"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f6e460ab",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"see https://www.howbadismybatch.com/clusters.html"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@@ -1189,16 +1197,13 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# https://www.howbadismybatch.com/clusters.html\n",
|
||||
"\n",
|
||||
"import re\n",
|
||||
"\n",
|
||||
"batchCodeTable = createADRsByVAX_LOTTable(vaers, \"PFIZER\\BIONTECH\")\n",
|
||||
"batchCodeTable['VAX_LOT_PREFIX'] = batchCodeTable['VAX_LOT'].str[:2]\n",
|
||||
"batchCodeTable = batchCodeTable.sort_values(by = 'VAX_LOT_PREFIX', ascending = True)\n",
|
||||
"twoLetters = re.compile(r'^[a-zA-Z]{2}')\n",
|
||||
"batchCodeTable = filterColumnOfDataFrameWithRegexp(dataFrame = batchCodeTable, column = 'VAX_LOT_PREFIX', regexp = twoLetters)\n",
|
||||
"batchCodeTable[batchCodeTable['VAX_LOT_PREFIX'].apply(lambda vax_lot_prefix: bool(twoLetters.match(vax_lot_prefix)))]\n",
|
||||
"twoLetterPrefix = re.compile(r'^[a-zA-Z]{2}')\n",
|
||||
"batchCodeTable = filterColumnOfDataFrameWithRegexp(dataFrame = batchCodeTable, column = 'VAX_LOT_PREFIX', regexp = twoLetterPrefix)\n",
|
||||
"batchCodeTable = batchCodeTable[batchCodeTable['VAX_LOT_PREFIX'].isin(['EN', 'EP', 'ER', 'EW', 'FA', 'FC', 'FD', 'FE', 'FH'])]\n",
|
||||
"batchCodeTable = batchCodeTable[batchCodeTable['ADRs'] > 400]\n",
|
||||
"batchCodeTable"
|
||||
|
||||
Reference in New Issue
Block a user