UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 3114: invalid continuation byte报错

movies = pd.read_table(
file_path,
header = None,
sep="::",
names=["movieID","title","genres"],
engine = "python",

)

添加 encoding='ISO-8859-1'可解决该问题


movies = pd.read_table(
file_path,
header = None,
sep="::",
names=["movieID","title","genres"],
engine = "python",
encoding='ISO-8859-1'
)
posted @ 2022-10-24 11:53  菜鸟&码农  阅读(656)  评论(0编辑  收藏  举报