Commit 205e815a authored by 张彦钊's avatar 张彦钊

修改es tag统计脚本

parent 021ab4cc
......@@ -436,7 +436,7 @@ def answer():
df = pd.DataFrame(total_list)
df = df.rename(columns={0: "tag", 1: "star_3", 2: "star_4", 3: "star_5",
4: "video_star_3", 5: "video_star_4", 6: "video_star_5"})
df.to_csv("/home/gmuser/answer.csv", index=False, encoding="utf_8_sig")
df.to_csv("/home/gmuser/tag_answer.csv", index=False, encoding="utf_8_sig")
def question():
......@@ -682,7 +682,7 @@ def question():
df = pd.DataFrame(total_list)
df = df.rename(columns={0: "tag", 1: "number", 2: "video_number"})
df.to_csv("/home/gmuser/question.csv", index=False, encoding="utf_8_sig")
df.to_csv("/home/gmuser/tag_question.csv", index=False, encoding="utf_8_sig")
def topic():
......@@ -1073,7 +1073,7 @@ def topic():
df = pd.DataFrame(total_list)
df = df.rename(columns={0: "tag", 1: "star_3", 2: "star_4", 3: "star_5",
4: "video_star_3", 5: "video_star_4", 6: "video_star_5"})
df.to_csv("/home/gmuser/topic.csv", index=False, encoding="utf_8_sig")
df.to_csv("/home/gmuser/tag_topic.csv", index=False, encoding="utf_8_sig")
def test_topic():
query_operator = "and"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment