Instruction
All right, it's time to wrap things up!
- A CSV dialect is just a list of parameters that specify a specific CSV file format.
- For each dialect, you can set the following options:
delimiterquotechardoublequoteescapecharlineterminatorquotingskipinitialspace
- To use a given dialect, provide its name as the
dialectparameter. For instance:csv_reader = csv.reader(csv_file, dialect='unix')
- To create a new dialect, use:
csv.register_dialect('dialect_name', parameter1='value1', parameter2='value2'...)To check its properties later on, use:csv.get_dialect('dialect_name')And be sure to add the property of your choice at the end. For example:csv.get_dialect('dialect_name').delimiter - To list all available dialects, use:
csv.list_dialects()
Great! Ready for a quick task?
Exercise
Click to continue.



