Python - Reading and writing csv files with utf-8 encoding
问题 I'm trying to read a csv file the its header contains foreign characters and I'm having a lot of problems with this. first of all, I'm reading the file with a simple csv.reader filename = 'C:\\Users\\yuval\\Desktop\\בית ספר\\עבודג\\new\\resources\\mk'+ str(mkNum) + 'Data.csv' raw_data = open(filename, 'rt', encoding="utf8") reader = csv.reader(raw_data, delimiter=',', quoting=csv.QUOTE_NONE) x = list(reader) header = x[0] data = np.array(x[1:]).astype('float') The var header should be an