[PYTHON] AHC task (1) Reading CSV file

Code for reading the stimulus prepared in the csv file

encodecsv.py


import csv

f = open('stimuliSet1.csv', encoding = 'utf-8_sig')
reader = csv.reader(f)

for row in reader:
   print(row)

f.close()

Recommended Posts

AHC task (1) Reading CSV file
Python CSV file reading and writing
AHC task (2) append
AHC task (3) Read CSV as a dictionary
[pandas] .csv file reading and display method
I tried reading a CSV file using Python
Read CSV file: pandas
Reading pyc file (Python 3.5.2)
Reading pandas format file
Read Python csv file
python external file reading
[Python] Reading CSV files
Read and write csv file
Reading and writing csv files
Download csv file with python
[Python] Write to csv file with Python
Output to csv file with Python
Reading and writing CSV with Python
Python CSV file Character code conversion, file name extraction, reading, output, merging operation
Error due to UnicodeDecodeError when reading CSV file with Python [For beginners]