From 1ec77c3fe94e197f02ecd5160cf9d3e70a8090bc Mon Sep 17 00:00:00 2001 From: frankknoll Date: Mon, 17 Apr 2023 08:46:12 +0200 Subject: [PATCH] deleteEntriesWithADRsLessThanOrEqual from batchCodeTable --- src/BatchCodeTablePersister.py | 3 ++- src/HowBadIsMyBatch.ipynb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BatchCodeTablePersister.py b/src/BatchCodeTablePersister.py index 2ef13eb14f8..21bb380eb0d 100644 --- a/src/BatchCodeTablePersister.py +++ b/src/BatchCodeTablePersister.py @@ -1,7 +1,8 @@ import numpy as np -def createGlobalBatchCodeTable(minADRsForLethality, batchCodeTableFactory): +def createGlobalBatchCodeTable(deleteEntriesWithADRsLessThanOrEqual, minADRsForLethality, batchCodeTableFactory): batchCodeTable = batchCodeTableFactory.createGlobalBatchCodeTable() + batchCodeTable = batchCodeTable[~(batchCodeTable['Adverse Reaction Reports'] <= deleteEntriesWithADRsLessThanOrEqual)] batchCodeTable.index.set_names("Batch", inplace=True) if minADRsForLethality is not None: batchCodeTable.loc[ diff --git a/src/HowBadIsMyBatch.ipynb b/src/HowBadIsMyBatch.ipynb index 99c7474a59f..88a77810605 100644 --- a/src/HowBadIsMyBatch.ipynb +++ b/src/HowBadIsMyBatch.ipynb @@ -131,6 +131,7 @@ "outputs": [], "source": [ "batchCodeTable = createGlobalBatchCodeTable(\n", + " deleteEntriesWithADRsLessThanOrEqual = 1,\n", " minADRsForLethality = 100,\n", " batchCodeTableFactory = BatchCodeTableFactory(internationalVaersCovid19))\n", "batchCodeTable"