I have a problem when reading a csv file. I am trying to fill my arrays from the rows of the csv file and I get this error :
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 38: invalid continuation byte
Here are my csv file and my code :
import csv
A=[]
T=[]
with open("classeur_test.csv",'r') as csvfile:
reader=csv.reader(csvfile, delimiter=',')
for row in reader :
A.append(float(row[0]))
T.append(float(row[1]))
Do you know why ?
打开csv文件和代码时,我只需要注意分隔符。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.