Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

remove newlines from csv

import csv
...

with open(in_fnam, newline='') as in_file:
    with open(out_fnam, 'w', newline='') as out_file:
        writer = csv.writer(out_file)
        for row in csv.reader(in_file):
            if row:
                writer.writerow(row)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #newlines #csv
ADD COMMENT
Topic
Name
6+7 =