HeJ小鼠, 无论我尝试什么,我都会收到错误:文件无法识别为'CSV数据文件'文件,原因:null ,同时将cvs文件加载到Weka资源管理器中。有什么建议可能是错的吗? 我一直在尝试“纠正”这种类型的错误错误的数值,读取1,预期2令牌[EOL],第17行并且在它停止给出那些之后, null 一个出现。
相关文件:file link
提前谢谢!
答案 0 :(得分:0)
我已经使用这些shell命令预处理了文件。
# optional:
# The file uses "\r" characters (sometimes displayed as ^M) characters
# as line separator. Character "\n" is better.
# make it a unix-compliant csv file
# original file is saved into ~/Downloads/rezultati.csv.bak
perl -pi.bak -E "s/\r/\n/g" ~/Downloads/rezultati.csv
# end optional
# take first 240 lines, except the defective last line .
# I don't know what's wrong with it. maybe it's "No newline at end of file"
# I'll just omit that single line starting with ID 243.
head -240 ~/Downloads/rezultati.csv > ~/Downloads/rezultati-240.csv
resultati-240.csv可以加载到weka。