From 576ef6f6d579a6bf0a1fa420bc5d201f8a2ff876 Mon Sep 17 00:00:00 2001 From: Dinuka De Silva Date: Sat, 18 Jul 2020 06:00:03 +0530 Subject: [PATCH] gh-714: Fix the total polled vote count on PE-R2 letter This fixes #714 --- results-tabulation-api/ext/ExtendedTallySheet/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/results-tabulation-api/ext/ExtendedTallySheet/__init__.py b/results-tabulation-api/ext/ExtendedTallySheet/__init__.py index 67193690..d1331769 100644 --- a/results-tabulation-api/ext/ExtendedTallySheet/__init__.py +++ b/results-tabulation-api/ext/ExtendedTallySheet/__init__.py @@ -819,6 +819,8 @@ def get_area_wise_vote_count_result(self): df = self.df.copy() df['numValue'] = df['numValue'].astype(float) + df = df.loc[(df['templateRowType'] == "PARTY_WISE_VOTE") | (df['templateRowType'] == "REJECTED_VOTE")] + df = df.groupby( ['areaId', "areaName"] ).agg({