这类错误的原因是编码造成的,通常情况下都是utf-8编码,这需要变换一下,改成encoding="ISO-8859-1"即可:

file = pd.read_csv("/input/Aliases.csv",encoding="ISO-8859-1")

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 3: invalid start byte错误解决办法的更多相关文章

  1. UnicodeDecodeError: 'utf8' codec can't decode byte 0xce in position 47: invalid continuation byte

  2. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 22: invalid continuation byte

    在使用python读取文本文件,一般会这样写: # -*- coding:utf-8 -*- f = open("train.txt", "r", encodi ...

  3. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xce in position 52: invalid continuation byte

    代码: df_w = pd.read_table( r'C:\Users\lab\Desktop\web_list_n.txt', sep=',', header=None) 当我用pandas的re ...

  4. TensorFlow学习笔记(UTF-8 问题解决 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte)

    我使用VS2013  Python3.5  TensorFlow 1.3  的开发环境 UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff ...

  5. UnicodeDecodeError: 'utf-8' codec can't decode byte 0xef in position 99: invalid continuation byte

    Traceback (most recent call last): File "/Users/c2apple/PycharmProjects/easyToPython/fileMethod ...

  6. tensorflow UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

    tensorflow读取图像出现错误:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid s ...

  7. 【python库安装问题解决】UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc0 in position 121: invalid start byte

    好久没用python了...今天随便pip安装个库突然报错: Exception:‘’ (most recent call last):  File "C:\ProgramData\Anac ...

  8. 【安装Python环境】之安装Selenium2时报UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc8 in position 12: invalid continuation byte问题

    问题描述: windows8.1系统,Python3环境安装Selenium2时报错,错误如下: ..... ..... File "F:\软件\python3.6.1\lib\site-p ...

  9. 文件读取错误UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 884: invalid start byte

    参考: https://segmentfault.com/q/1010000004268196/a-1020000004269556 ubuntu下Python3使用open('filename', ...

随机推荐

  1. FMDB的操作

    #import "ZYDataManager.h" #import "JSSportModel.h" FMDatabase *db = nil; @implem ...

  2. HeadFirst设计模式---简单工厂

    简单工厂的理解 简单工厂不是设计模式的一种,只是代码规范而且.也就是说构造一个披萨工厂出来,按不同味道生产不同的披萨. 类图 抽象披萨 public abstract class AbstractPi ...

  3. Jenkins+gradle+git部署

    感谢博友分享,这边记录下https://blog.csdn.net/jiankeufo/article/details/78228334 我的密码7789cc2b62114e9da9fb78b0aa3 ...

  4. [TCP/IP] TCP的报文头

    1.源端口和目的端口:各占2个字节,分别写入源端口和目的端口: 2.序列号:占4个字节,TCP连接中传送的字节流中的每个字节都按顺序编号.例如,一段报文的序号字段值是 301 ,而携带的数据共有100 ...

  5. 201871010112-梁丽珍《面向对象程序设计(java)》第十五周学习总结

    博文正文开头格式:(2分) 项目 内容 这个作业属于哪个课程 https://www.cnblogs.com/nwnu-daizh/ 这个作业的要求在哪里 https://www.cnblogs.co ...

  6. 错误: 找不到或无法加载主类 com.leyou.LeyouItemApplication Process finished with exit code 1

    在IDEA的使用过程中,经常断掉服务或者重启服务,最近断掉服务重启时突然遇到了一个启动报错: 错误:找不到或无法加载主类 猜测:1,未能成功编译: 尝试:菜单--->Build--->Re ...

  7. LeetCode 112. Path Sum路径总和 (C++)

    题目: Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up ...

  8. SQL Server 迁移数据库 (一)导入和导出

    今天正好换服务器,记录一下迁移数据库的过程. 以前经常用备份还原法,今天试试‘SQL Server 2016 导入和导出数据’这个看怎么玩. 1. 建数据库结构 1.1 在需要迁移的数据库名字上右击, ...

  9. CF1175D Array Splitting

    题目链接 题意 给出一个长度为\(n\)的序列\(a\),要求分为恰好\(K\)段.第\(i\)个点的贡献是\(a_i \times f(i)\),\(f(x)\)表示x所属的是第几段. 思路 非常巧 ...

  10. [LeetCode] 95. Unique Binary Search Trees II 独一无二的二叉搜索树之二

    Given an integer n, generate all structurally unique BST's (binary search trees) that store values 1 ...