refactoring

This commit is contained in:
frankknoll
2023-10-03 22:51:33 +02:00
parent 93ff6fcaeb
commit 2788882ec1
3 changed files with 17 additions and 13 deletions

View File

@@ -1,19 +1,12 @@
import pandas as pd
import glob
from CountryCountsByClickedBatchcodeProvider import CountryCountsByClickedBatchcodeProvider
from TablesHelper import TablesHelper
class CountryCountsByBatchcodeTablesMerger:
@staticmethod
def mergeCountryCountsByBatchcodeTables(countryCountsByBatchcodeTables):
return (pd
.concat(countryCountsByBatchcodeTables)
.groupby(countryCountsByBatchcodeTables[0].index.names)
.sum())
@staticmethod
def getCountryCountsByClickedBatchcodeTable():
return CountryCountsByBatchcodeTablesMerger.mergeCountryCountsByBatchcodeTables(CountryCountsByBatchcodeTablesMerger._getTables())
return TablesHelper.concatTables_groupByIndex_sum(CountryCountsByBatchcodeTablesMerger._getTables())
@staticmethod
def _getTables():