我想读取arff文件,但我收到此错误。任何人都可以帮助我
import arff, numpy as np
dataset = arff.load(open('ckdfull.arff', 'rb'))
data = np.array(dataset['data'])
Traceback (most recent call last):
File "C:/Users/username/PycharmProjects/ckd/ckd.py", line 2, in <module>
dataset = arff.load(open('ckdfull.arff', 'rb'))
File "C:\Users\username\PycharmProjects\ckd\venv\lib\site-packages\arff.py", line 896, in load
return_type=return_type)
File "C:\Users\username\PycharmProjects\ckd\venv\lib\site-packages\arff.py", line 739, in decode
matrix_type=return_type)
File "C:\Users\username\PycharmProjects\ckd\venv\lib\site-packages\arff.py", line 651, in _decode
row = row.strip(' \r\n')
TypeError: a bytes-like object is required, not 'str'
谢谢