解决python写入中文乱码问题:
添加encoding='utf-8-sig'
with open('result.csv', 'w', encoding='utf-8-sig', newline='') as f:
writer = csv.writer(f)
writer.writerows(data)
解决python写入中文乱码问题:
添加encoding='utf-8-sig'
with open('result.csv', 'w', encoding='utf-8-sig', newline='') as f:
writer = csv.writer(f)
writer.writerows(data)