refactoring
This commit is contained in:
@@ -128,11 +128,7 @@
|
|||||||
" \n",
|
" \n",
|
||||||
" def __init__(self, dataFrame : pd.DataFrame):\n",
|
" def __init__(self, dataFrame : pd.DataFrame):\n",
|
||||||
" self.dataFrame = dataFrame \n",
|
" self.dataFrame = dataFrame \n",
|
||||||
" self._convertColumnOfDataFrameToNumeric('DIED')\n",
|
" self._convertColumnsOfDataFrameToNumerics(['DIED', 'L_THREAT', 'DISABLE', 'HOSPITAL', 'ER_VISIT'])\n",
|
||||||
" self._convertColumnOfDataFrameToNumeric('L_THREAT')\n",
|
|
||||||
" self._convertColumnOfDataFrameToNumeric('DISABLE')\n",
|
|
||||||
" self._convertColumnOfDataFrameToNumeric('HOSPITAL')\n",
|
|
||||||
" self._convertColumnOfDataFrameToNumeric('ER_VISIT')\n",
|
|
||||||
"\n",
|
"\n",
|
||||||
" def createBatchCodeTable(self):\n",
|
" def createBatchCodeTable(self):\n",
|
||||||
" batchCodeTable = self.dataFrame.groupby('VAX_LOT').agg(\n",
|
" batchCodeTable = self.dataFrame.groupby('VAX_LOT').agg(\n",
|
||||||
@@ -193,6 +189,10 @@
|
|||||||
" manufacturerByBatchCodeTable = manufacturerByBatchCodeTable.drop_duplicates(subset = ['VAX_LOT'])\n",
|
" manufacturerByBatchCodeTable = manufacturerByBatchCodeTable.drop_duplicates(subset = ['VAX_LOT'])\n",
|
||||||
" return manufacturerByBatchCodeTable.set_index('VAX_LOT')\n",
|
" return manufacturerByBatchCodeTable.set_index('VAX_LOT')\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
" def _convertColumnsOfDataFrameToNumerics(self, columns):\n",
|
||||||
|
" for column in columns:\n",
|
||||||
|
" self._convertColumnOfDataFrameToNumeric(column)\n",
|
||||||
|
"\n",
|
||||||
" def _convertColumnOfDataFrameToNumeric(self, column):\n",
|
" def _convertColumnOfDataFrameToNumeric(self, column):\n",
|
||||||
" self.dataFrame[column] = np.where(self.dataFrame[column] == 'Y', 1, 0)\n",
|
" self.dataFrame[column] = np.where(self.dataFrame[column] == 'Y', 1, 0)\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
|||||||
3
help.txt
3
help.txt
@@ -1,5 +1,8 @@
|
|||||||
jupyter notebook
|
jupyter notebook
|
||||||
|
|
||||||
|
get VAERS data:
|
||||||
|
- download data (e.g. 2022VAERSData.zip) from https://vaers.hhs.gov/data/datasets.html and save and unzip in VAERS folder
|
||||||
|
|
||||||
FK-TODO:
|
FK-TODO:
|
||||||
- https://www.howbadismybatch.com/firstsecond.html nachprogrammieren
|
- https://www.howbadismybatch.com/firstsecond.html nachprogrammieren
|
||||||
- VAX_LOT-Spalte normalisieren, d.h. mindestens toUpperCase() darauf anwenden
|
- VAX_LOT-Spalte normalisieren, d.h. mindestens toUpperCase() darauf anwenden
|
||||||
|
|||||||
Reference in New Issue
Block a user