refactoring

This commit is contained in:
frankknoll
2023-02-06 12:31:20 +01:00
parent 8e311dfa03
commit c3ad15a24c
2 changed files with 7 additions and 6 deletions

View File

@@ -1,5 +1,6 @@
import pandas as pd
import numpy as np
from Utils import fillLsts
class SymptomByBatchcodeTableFactory:
@@ -73,9 +74,3 @@ class SymptomByBatchcodeTableFactory:
.dropna()
.to_frame(name = symptomColumn)
.reset_index())
def fillLsts(lsts, desiredLen, fillValue):
return [fillLst(lst, desiredLen, fillValue) for lst in lsts]
def fillLst(lst, desiredLen, fillValue):
return lst + [fillValue] * (max(desiredLen - len(lst), 0))