当前位置:网站首页>UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd0 in position 0成功解决
UnicodeDecodeError: ‘utf-8‘ codec can‘t decode byte 0xd0 in position 0成功解决
2022-07-06 09:11:00 【一曲无痕奈何】
做情感分类任务时候,读取csv文件恶心到死了,文件编码格式用notepad查看utf8,并且pycharm 也设置utf8格式,依旧一直报错,最后加了encoding="ISO-8859-1"竟然成功了,反正不理解,理论应该用utf8的,可能数据还是有问题,或者可以用记事本转一下,重新保存。
import pandas as pd
#读取数据, engine 默认是C
dataset = pd.read_csv("./data/training.1600000.processed.noemoticon.csv",encoding="ISO-8859-1",engine='python',header = None)
#查看数据表的shape
边栏推荐
猜你喜欢

Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide

Use xtrabackup for MySQL database physical backup

13 医疗挂号系统_【 微信登录】

Super detailed steps for pushing wechat official account H5 messages

Teach you how to write the first MCU program hand in hand

C杂讲 文件 初讲

MySQL实战优化高手11 从数据的增删改开始讲起,回顾一下Buffer Pool在数据库里的地位

Solve the problem of remote connection to MySQL under Linux in Windows

C miscellaneous lecture continued

Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)
随机推荐
Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide
The appearance is popular. Two JSON visualization tools are recommended for use with swagger. It's really fragrant
解决在window中远程连接Linux下的MySQL
[untitled]
cmooc互联网+教育
Implement context manager through with
Some thoughts on the study of 51 single chip microcomputer
Not registered via @enableconfigurationproperties, marked (@configurationproperties use)
[NLP] bert4vec: a sentence vector generation tool based on pre training
History of object recognition
Preliminary introduction to C miscellaneous lecture document
Tianmu MVC audit I
Docker MySQL solves time zone problems
Mexican SQL manual injection vulnerability test (mongodb database) problem solution
C miscellaneous lecture continued
Competition vscode Configuration Guide
Can I learn PLC at the age of 33
The real future of hardware engineers may not be believed by you if I say so
Control the operation of the test module through the panel in canoe (primary)
A necessary soft skill for Software Test Engineers: structured thinking