From aa1067aa964fd544c148b036ea347ccc9eff1677 Mon Sep 17 00:00:00 2001 From: guange <8863824@gmail.com> Date: Mon, 21 Jan 2019 16:48:49 +0800 Subject: [PATCH] 1 --- chapter3/spark.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter3/spark.py b/chapter3/spark.py index 750e795..95603f0 100644 --- a/chapter3/spark.py +++ b/chapter3/spark.py @@ -142,8 +142,8 @@ def collect_sentiments(spark): #荣耀10 df2 = spark.sql("select * from jd_comment where id like '7081550%'") - xiaomi_s = get_sentiments(df1) - huawei_s = get_sentiments(df2) + xiaomi_s = _get_sentiments(df1) + huawei_s = _get_sentiments(df2) data = {"xiaomi_s": xiaomi_s, "huawei_s": huawei_s} mysql_execute("update datas set data = '{}' where `key` = 'sentiments'".format(