From 7f0b7bc5be3856324f79096f9f28acd6b4836cf2 Mon Sep 17 00:00:00 2001 From: cclauss Date: Thu, 26 Apr 2018 01:04:36 -0600 Subject: [PATCH] Variable name: change seller to category MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In the current code, __seller__ is an unused variable and __category__ is an undefined name (see #93). Given that the class is __SpendingByCategory__, this PR advocates changing seller —> category. --- solutions/system_design/mint/mint_mapreduce.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solutions/system_design/mint/mint_mapreduce.py b/solutions/system_design/mint/mint_mapreduce.py index 3dc88558..e3554243 100644 --- a/solutions/system_design/mint/mint_mapreduce.py +++ b/solutions/system_design/mint/mint_mapreduce.py @@ -30,7 +30,7 @@ class SpendingByCategory(MRJob): (2016-01, shopping), 100 (2016-01, gas), 50 """ - timestamp, seller, amount = line.split('\t') + timestamp, category, amount = line.split('\t') period = self. extract_year_month(timestamp) if period == self.current_year_month(): yield (period, category), amount