This commit is contained in:
parent
fab6c5443e
commit
aa1067aa96
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue