Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
CSV dialects
5. Dialects for CSV reading


Good job! It's time to see how we can use a dialect when reading a CSV file. Take a look:

import csv
with open('animals.csv') as csv_file:
  csv_reader = csv.reader(csv_file, dialect='unix')
  for row in csv_reader:

The only thing you need to do is specify the optional dialect parameter when invoking csv.reader() or csv.DictReader(). You can see how easy it is to use dialects now!


Open the budget.csv file. Print each row on a new line as shown in the explanation. Use the excel-tab dialect.

Stuck? Here's a hint!

Use the following optional parameter: dialect='excel-tab'.