Python读取列名手动删除BOM示例代码(在Python中打开文件使用utf-8-sig和utf-8的区别)
摘要:
def read_csv_to_dict(filename): with open(filename, 'r', errors='ignore', encoding='gbk') as f: reader = csv.DictReader(f) fieldnames = [name.lstrip(' 阅读全文
posted @ 2024-09-11 07:51 GoGrid 阅读(12) 评论(0) 推荐(0) 编辑