formating
This commit is contained in:
@@ -42,14 +42,17 @@ class SymptomByBatchcodeTableFactory:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def _getSymptomsTable(VAERSSYMPTOMS, symptomColumn):
|
def _getSymptomsTable(VAERSSYMPTOMS, symptomColumn):
|
||||||
return pd.concat(
|
return (pd.concat(
|
||||||
[
|
[
|
||||||
VAERSSYMPTOMS['SYMPTOM1'],
|
VAERSSYMPTOMS['SYMPTOM1'],
|
||||||
VAERSSYMPTOMS['SYMPTOM2'],
|
VAERSSYMPTOMS['SYMPTOM2'],
|
||||||
VAERSSYMPTOMS['SYMPTOM3'],
|
VAERSSYMPTOMS['SYMPTOM3'],
|
||||||
VAERSSYMPTOMS['SYMPTOM4'],
|
VAERSSYMPTOMS['SYMPTOM4'],
|
||||||
VAERSSYMPTOMS['SYMPTOM5']
|
VAERSSYMPTOMS['SYMPTOM5']
|
||||||
]).dropna().to_frame(name = symptomColumn).reset_index()
|
])
|
||||||
|
.dropna()
|
||||||
|
.to_frame(name = symptomColumn)
|
||||||
|
.reset_index())
|
||||||
|
|
||||||
def fillLsts(lsts, desiredLen, fillValue):
|
def fillLsts(lsts, desiredLen, fillValue):
|
||||||
return [fillLst(lst, desiredLen, fillValue) for lst in lsts]
|
return [fillLst(lst, desiredLen, fillValue) for lst in lsts]
|
||||||
|
|||||||
@@ -5,4 +5,4 @@ class SymptomHistogramByBatchcodeTableFactory:
|
|||||||
return (symptomByBatchcodeTable
|
return (symptomByBatchcodeTable
|
||||||
.groupby(symptomByBatchcodeTable.index.names)
|
.groupby(symptomByBatchcodeTable.index.names)
|
||||||
['SYMPTOM'].value_counts()
|
['SYMPTOM'].value_counts()
|
||||||
.to_frame('SYMPTOM_COUNT_BY_VAX_LOT'))
|
.to_frame(name = 'SYMPTOM_COUNT_BY_VAX_LOT'))
|
||||||
|
|||||||
Reference in New Issue
Block a user