Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
system-design-primer
Commits
ad40b8e6
Commit
ad40b8e6
authored
May 23, 2018
by
cclauss
Committed by
Donne Martin
May 22, 2018
Browse files
Change variable seller to category in Mint solution (#159)
parent
a3604834
Changes
1
Hide whitespace changes
Inline
Side-by-side
solutions/system_design/mint/mint_mapreduce.py
View file @
ad40b8e6
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment