Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python dictionary to csv

import csv
csv_columns = ['word','matchin']

csv_file = "found.csv"
try:
    with open(csv_file, 'w') as csvfile:
        writer = csv.DictWriter(csvfile, fieldnames=csv_columns)
        writer.writeheader()
        for data in corpus:
            writer.writerow(data)
except IOError:
    print("I/O error")
 
PREVIOUS NEXT
Tagged: #python #dictionary #csv
ADD COMMENT
Topic
Name
2+6 =