refactoring

This commit is contained in:
frankknoll
2023-03-10 17:52:07 +01:00
parent 3f38e066a5
commit 095f7f0b4c

View File

@@ -6,5 +6,5 @@ class VaccineDistributionByZipcodeSimplifier:
def sumDoses(vaccineDistributionByZipcode): def sumDoses(vaccineDistributionByZipcode):
return (vaccineDistributionByZipcode return (vaccineDistributionByZipcode
.groupby(['PROVIDER_NAME', 'ZIPCODE_SHP', 'LOT_NUMBER']) .groupby(['PROVIDER_NAME', 'ZIPCODE_SHP', 'LOT_NUMBER'])
.agg(DOSES_SHIPPED = pd.NamedAgg(column = 'DOSES_SHIPPED', aggfunc = 'sum')) .agg(DOSES_SHIPPED = pd.NamedAgg(column = 'DOSES_SHIPPED', aggfunc = sum))
.reset_index()) .reset_index())