摘要: import csv 1,读取 with open('write.csv', 'r') as f: #打开 text = csv.reader(f) #读取 # print(text) for row in text: #必须这样才可以读取出数据 print(row) text = csv.Dict 阅读全文
posted @ 2022-08-21 21:01 记录——去繁就简 阅读(72) 评论(0) 推荐(0)
摘要: import json# json.loads() 是将字符串转换为字典# json.dumps() 是# json.load()# json.dump()# # 写入 JSON 数据# with open('data.json', 'w') as f:# json.dump(data, f)## 阅读全文
posted @ 2022-08-21 21:01 记录——去繁就简 阅读(15) 评论(0) 推荐(0)