摘要: import jsonimport randomimport reimport subprocessfrom functools import partialfrom faker import Fakerfrom parsel import Selectorfake = Faker(locale=' 阅读全文
posted @ 2024-06-08 01:21 我爱你的 阅读(203) 评论(0) 推荐(0)
摘要: from faker import Fakerfake_ = Faker(locale='zh_CN') with open('file.csv', "a", encoding="utf-8") as f: for i in range(100,8000): f.write(f"{i},{fake_ 阅读全文
posted @ 2024-06-08 01:09 我爱你的 阅读(41) 评论(0) 推荐(0)
摘要: from openpyxl import load_workbook from typing import Union, List, IOimport openpyxlimport pandas as pdimport os def write_excel(file_full_path, value 阅读全文
posted @ 2024-06-08 00:40 我爱你的 阅读(621) 评论(0) 推荐(0)
摘要: #方便不占用内存,缺点最后写完后会多一个逗号,要自己手动删除 def begin_write_json(): with open('file.json', "w", encoding="utf-8") as f: f.write("[")def write_josn(items:dict): wit 阅读全文
posted @ 2024-06-08 00:15 我爱你的 阅读(46) 评论(0) 推荐(0)