我使用unicodesv模块将一个列表写入csv文件,用“utf-8”编码,但是当我尝试使用unicodesv.reader,我仍然得到错误:UnicodeDecodeError: 'utf8' codec can't decode byte...
。我可以通过csv.reader. 我有什么遗漏吗?在
我的密码是这样的:
with open(datapath + filename, 'wb') as csvfile:
writer_to_csv = unicodecsv.writer(csvfile, encoding = "utf-8")
writer_to_csv.writerows(data)
当我试着读的时候:
^{pr2}$我收到了错误信息。在
目前没有回答
相关问题 更多 >
编程相关推荐