当前位置:网站首页>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
边栏推荐
猜你喜欢
Redis集群方案应该怎么做?都有哪些方案?
C杂讲 双向循环链表
Southwest University: Hu hang - Analysis on learning behavior and learning effect
What should the redis cluster solution do? What are the plans?
Super detailed steps to implement Wechat public number H5 Message push
C杂讲 文件 初讲
Solve the problem of remote connection to MySQL under Linux in Windows
MySQL底层的逻辑架构
再有人问你数据库缓存一致性的问题,直接把这篇文章发给他
MySQL实战优化高手04 借着更新语句在InnoDB存储引擎中的执行流程,聊聊binlog是什么?
随机推荐
MySQL combat optimization expert 03 uses a data update process to preliminarily understand the architecture design of InnoDB storage engine
Const decorated member function problem
History of object recognition
14 medical registration system_ [Alibaba cloud OSS, user authentication and patient]
[after reading the series of must know] one of how to realize app automation without programming (preparation)
Canoe cannot automatically identify serial port number? Then encapsulate a DLL so that it must work
Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide
C miscellaneous shallow copy and deep copy
MySQL real battle optimization expert 08 production experience: how to observe the machine performance 360 degrees without dead angle in the process of database pressure test?
Sed text processing
MySQL实战优化高手12 Buffer Pool这个内存数据结构到底长个什么样子?
[untitled]
Use xtrabackup for MySQL database physical backup
MySQL實戰優化高手08 生產經驗:在數據庫的壓測過程中,如何360度無死角觀察機器性能?
华南技术栈CNN+Bilstm+Attention
The appearance is popular. Two JSON visualization tools are recommended for use with swagger. It's really fragrant
Safety notes
MySQL实战优化高手05 生产经验:真实生产环境下的数据库机器配置如何规划?
Jar runs with error no main manifest attribute
Sichuan cloud education and double teacher model