在用pandas的read_table读取文件时,报了错,最后显示UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3114: invalid continuation byte,显然解码出错,意思为*“utf-8”编解码器无法解码位置3114中的字节0xe9:无效的延续字节*。
解决办法:
movies=pd.read_table("../data/movies.dat",sep='::',
names=['userId','movieId','score'],engine='python',encoding=' ISO-8859-1')
即在读取的时候,就告诉它用ISO-8859-1编码方式
编码与解码: https://blog.csdn.net/qq_33240946/article/details/88936379
【GBK、UTF-8、ISO8859-1】三种编码方式总结及实例: https://www.cnblogs.com/amunamuna/p/8922125.html



