Variable name: change seller to category

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.
pull/159/head
cclauss 2018-04-26 01:04:36 -06:00 committed by GitHub
parent a70a8f3a04
commit 7f0b7bc5be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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