• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
9 views

Probem :

I am getting bellow error

new-line character seen in unquoted field - do you need to open the file in universal-newline mode?

by (6.9k points)  

1 Answer

0 votes

Solution :

I had faced the same issue on my MAC, i followed bellow steps to resolve the issue. 

  1. Save the file as CSV (MS-DOS Comma-Separated)
  2. Run the bellow script

    with open(csv_filename, 'rU') as csvfile:
        csvreader = csv.reader(csvfile)
        for row in csvreader:
            print ', '.join(row)

Further Readings:

by (20.3k points)  
...