CSV new-line character seen in unquoted field error

后端 未结 9 1268
花落未央
花落未央 2020-11-27 14:14

the following code worked until today when I imported from a Windows machine and got this error:

new-line character seen in unquoted field - do you need to o

9条回答
  •  遥遥无期
    2020-11-27 14:26

    I realize this is an old post, but I ran into the same problem and don't see the correct answer so I will give it a try

    Python Error:

    _csv.Error: new-line character seen in unquoted field
    

    Caused by trying to read Macintosh (pre OS X formatted) CSV files. These are text files that use CR for end of line. If using MS Office make sure you select either plain CSV format or CSV (MS-DOS). Do not use CSV (Macintosh) as save-as type.

    My preferred EOL version would be LF (Unix/Linux/Apple), but I don't think MS Office provides the option to save in this format.

提交回复
热议问题