Reading a CSV file in Python using the "csv" module's "reader" object

Published: 03 October 2023
on channel: PatchyPython
53
1

CSV (Comma Separated Values) files are a popular format for all sort of information, including spreadsheets. Here I show you how to use the "reader" object from the "csv" module in the standard library to make reading CSV files even easier. This is especially useful when you are dealing with particular "dialects" of CSV files, that follow specific conventions for encoding some characters (for instance for including commas in the data, besides using them as separators). Instructions on writing CSV files can be found in the notebooks linked below.

Embedded video, part of the following courses:
Computer Programming at Queen Mary, University of London
Jupyter notebook: https://tinyurl.com/yc2tpdfs
Coding for Scientists at Queen Mary, University of London
Jupyter notebook: https://tinyurl.com/bdef2fcj

Notebooks will open on Google Colab - no installation required


Watch video Reading a CSV file in Python using the "csv" module's "reader" object online without registration, duration hours minute second in high quality. This video was added by user PatchyPython 03 October 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 53 once and liked it 1 people.