从python中的csv文件读取行时出错

2024-09-30 08:25:42 发布

您现在位置:Python中文网/ 问答频道 /正文

我想知道一个巨大的csv文件中的一些行,所以我做了这个

with open('###.csv','rb')` as csvfile:
    conusreader = csv.reader(csvfile,delimiter=' ', quotechar='|')
    for row in conusreader:
        print ', '.join(row)

然后我在Pycharm中出错了

"for row in conusreader: _csv.Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?"

我不太清楚这是什么意思。 有人能帮我修正这个错误吗?在


Tags: 文件csvcsvfileinforaswithopen

热门问题