refactoring
This commit is contained in:
@@ -31,7 +31,7 @@ class SymptomsByBatchcodesTableFactory:
|
|||||||
VAX_LOT_LIST_Table = VAERSVAX.groupby("VAERS_ID").agg(
|
VAX_LOT_LIST_Table = VAERSVAX.groupby("VAERS_ID").agg(
|
||||||
VAX_LOT_LIST = pd.NamedAgg(
|
VAX_LOT_LIST = pd.NamedAgg(
|
||||||
column = 'VAX_LOT',
|
column = 'VAX_LOT',
|
||||||
aggfunc = lambda x: sorted(list(x))))
|
aggfunc = lambda VAX_LOT_series: list(VAX_LOT_series.sort_values())))
|
||||||
return pd.DataFrame(
|
return pd.DataFrame(
|
||||||
fillLsts(
|
fillLsts(
|
||||||
lsts = VAX_LOT_LIST_Table['VAX_LOT_LIST'].tolist(),
|
lsts = VAX_LOT_LIST_Table['VAX_LOT_LIST'].tolist(),
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ from SymptomsByBatchcodesTableFactory import SymptomsByBatchcodesTableFactory
|
|||||||
import pandas as pd
|
import pandas as pd
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
|
# FIXME: brauchen Normalisierung analog zu DataFrameNormalizer.removeUnknownBatchCodes(dataFrame) und DataFrameNormalizer.convertVAX_LOTColumnToUpperCase(dataFrame)
|
||||||
class SymptomsByBatchcodesTableFactoryTest(unittest.TestCase):
|
class SymptomsByBatchcodesTableFactoryTest(unittest.TestCase):
|
||||||
|
|
||||||
def test_createSymptomsByBatchcodesTable(self):
|
def test_createSymptomsByBatchcodesTable(self):
|
||||||
@@ -167,5 +168,3 @@ class SymptomsByBatchcodesTableFactoryTest(unittest.TestCase):
|
|||||||
index = pd.MultiIndex.from_tuples(
|
index = pd.MultiIndex.from_tuples(
|
||||||
names = ['VAX_LOT1', 'VAX_LOT2'],
|
names = ['VAX_LOT1', 'VAX_LOT2'],
|
||||||
tuples = [['1808982', 'EW0175']] * 13 + [['EW0167', 'EW0175']] * 10)))
|
tuples = [['1808982', 'EW0175']] * 13 + [['EW0167', 'EW0175']] * 10)))
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user