我正在尝试读取此xlsx文件
tran=np.loadtxt("s.xlsx",delimiter=",")
x_train=tran[:,1:45]
y_train=tran[:,45]
test=np.loadtxt("s.xlsx",delimiter=",")
x_test=test[:,45]
y_test=test[:,:]
Traceback (most recent call last):
File "Example_1.py", line 11, in <module>
tran=np.loadtxt("s.xlsx",delimiter=",")
File "/home/siddharth/.local/lib/python2.7/site-packages/numpy/lib/npyio.py", line 1086, in loadtxt
first_line = next(fh)
File "/usr/lib/python2.7/codecs.py", line 314, in decode
(result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xab in position 11: invalid start byte
但是当我尝试运行程序时,出现此错误