This commit is contained in:
guange 2019-01-21 16:48:49 +08:00
parent fab6c5443e
commit aa1067aa96
1 changed files with 2 additions and 2 deletions

View File

@ -142,8 +142,8 @@ def collect_sentiments(spark):
#荣耀10 #荣耀10
df2 = spark.sql("select * from jd_comment where id like '7081550%'") df2 = spark.sql("select * from jd_comment where id like '7081550%'")
xiaomi_s = get_sentiments(df1) xiaomi_s = _get_sentiments(df1)
huawei_s = get_sentiments(df2) huawei_s = _get_sentiments(df2)
data = {"xiaomi_s": xiaomi_s, "huawei_s": huawei_s} data = {"xiaomi_s": xiaomi_s, "huawei_s": huawei_s}
mysql_execute("update datas set data = '{}' where `key` = 'sentiments'".format( mysql_execute("update datas set data = '{}' where `key` = 'sentiments'".format(