How to Read CSV File in Python
Published in
1 min readJan 13, 2019
Read CSV file using Python built-in CSV library
contacts.csv
name, phone_number
Vaibhav, +111111111111
John, +222222222
Read CSV File
import csv with open('contacts.csv') as contact_file:
csv_reader = csv.reader(contact_file, delimiter=',')
csv_reader.__next__() # skip headers of csv file for row in
csv_reader: print(f'Name: {row[0]} Number: {row[1]}')
Like this on Twitter | Like this on Instagram | Like this on Facebook
Originally published at pythonpips.com.