python pandas module read csv file code example
Example 1: python read csv
>>> import csv
>>> with open('eggs.csv', newline='') as csvfile:
... spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
... for row in spamreader:
... print(', '.join(row))
Spam, Spam, Spam, Spam, Spam, Baked Beans
Spam, Lovely Spam, Wonderful Spam
Example 2: read a csv file in pandas
you should be in the same dir as .py file
df = pd.read_csv('your_file_name.csv')