Python 数据处理 open函数newline用法

If csvfile is a file object, it should be opened with newline=''.

with open(r'C:\Users\Hanju\Desktop\uploadPortal(5).csv',"w", newline='') as _csvfile:
writer = csv.writer(_csvfile)

posted @ 2019-12-15 16:47  夕殿墨寒  阅读(6174)  评论(0编辑  收藏  举报