Spring Deals - hours only!Up to 70% off on all courses and bundles.-Close
CSV dialects
2. Why we may need CSV dialects


All right. In Part 1, we mentioned that there is no universal CSV standard. Rather, there are multiple CSV formats used in the IT world. These formats use different methods to delimit fields or terminate lines. In parts 2 and 3, we learned how to deal with such differences. When using CSV readers and writers, we could specify optional parameters, like this:

csv_reader = csv.DictReader(csv_file, delimiter=";", quotechar="'")

Those optional parameters may become a little inconvenient if you process lots of CSV files in different formats. That's where CSV dialects come in handy – and we'll show you how they work in a second.


Click Next exercise to continue.