Commit 13456735 authored by 赵威's avatar 赵威

rewrite data to file

parent 343999cd
......@@ -33,8 +33,7 @@ if __name__ == "__main__":
tractate_dict = {}
for item in get_tractate_info_from_es(["id", "portrait_tag_name"]):
id = item["_id"]
business_tags = item["_source"]["portrait_tag_name"]
tractate_dict[id] = ",".join(business_tags)
tractate_dict[id] = item["_source"]["portrait_tag_name"]
save_dict_to_csv(tractate_dict, "personas_tractate_tags.csv")
print(len(tractate_dict))
print(random.choice(list(tractate_dict.items())))
......
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