1
0
mirror of https://github.com/donnemartin/system-design-primer.git synced 2025-06-24 22:06:46 +02:00

Change variable seller to category in Mint solution (#159)

This commit is contained in:
cclauss
2018-05-23 05:15:42 +02:00
committed by Donne Martin
parent a36048346e
commit ad40b8e649

View File

@ -30,7 +30,7 @@ class SpendingByCategory(MRJob):
(2016-01, shopping), 100 (2016-01, shopping), 100
(2016-01, gas), 50 (2016-01, gas), 50
""" """
timestamp, seller, amount = line.split('\t') timestamp, category, amount = line.split('\t')
period = self. extract_year_month(timestamp) period = self. extract_year_month(timestamp)
if period == self.current_year_month(): if period == self.current_year_month():
yield (period, category), amount yield (period, category), amount