# coding:utf-8 import json import pandas as pd with open("./article_file/all_article.json","r",encoding="gbk") as f: text = json.load(f) article_dict = {"title":[],"content":[]} for item in text: article_dict["title"].append(item["article_title"]) article_dict["content"].append(item["article_content"]) article_data = pd.DataFrame(data=article_dict,columns=article_dict.keys()) article_data.to_csv("./article_file/article.csv") print("保存成功")