adding method SymptomHistogramByBatchcodeTableFactory.createGlobalSymptomHistogramByBatchcodeTable()
This commit is contained in:
@@ -8,3 +8,10 @@ class SymptomHistogramByBatchcodeTableFactory:
|
||||
.to_frame(name = 'SYMPTOM_COUNT_BY_VAX_LOT')
|
||||
.reset_index(level = 'COUNTRY')
|
||||
[['SYMPTOM_COUNT_BY_VAX_LOT', 'COUNTRY']])
|
||||
|
||||
@staticmethod
|
||||
def createGlobalSymptomHistogramByBatchcodeTable(symptomByBatchcodeTable):
|
||||
return (symptomByBatchcodeTable
|
||||
.groupby(symptomByBatchcodeTable.index.names)
|
||||
['SYMPTOM'].value_counts()
|
||||
.to_frame(name = 'SYMPTOM_COUNT_BY_VAX_LOT'))
|
||||
|
||||
Reference in New Issue
Block a user