Python·100 questions

How to work with CSV?

Answer
import csv.
reader = csv.DictReader(f).
Use: csv.DictWriter(...).writeheader(); writer.writerow(...).
Specify newline='' when opening.
For encodings use encoding='utf-8'.
Was this answer helpful?

More questions in this topic

Related questions from other topics