Numpy loadtxt encoding
问题 I am trying to load data with numpy.loadtxt... The file im trying to read is using cp1252 coding. Is there a possibility to change the encoding to cp1252 with numpy? The following import numpy as np n = 10 myfile = '/path/to/myfile' mydata = np.loadtxt(myfile, skiprows = n) gives: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf6 in position 189: invalid start byte The file contains metadata (first n rows) followed by a table of floats. Edit: This problem only occurs when running this