From cfea494f937dbfb5e31fde7024dd115f1171bb55 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Fri, 18 Jan 2019 17:29:22 +0800 Subject: [PATCH] . --- chapter3/spark.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chapter3/spark.py b/chapter3/spark.py index 660953f..3b78bcc 100644 --- a/chapter3/spark.py +++ b/chapter3/spark.py @@ -46,7 +46,7 @@ def get_last_month(num): if month<=0: month = 12 - (num-1) year -= 1 - return "%d-%d" % (year, month) + return "%d-%02d" % (year, month) def collect_last_month_sells(spark): data = {}