pandas 遇到的问题记录

问题:

在使用pandas来读取csv文件的时候,报错:

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcd in position 0: invalid continuation byte

解决方案:

使用

 read_csv('file',encoding = "ISO-8859-1")

或者

 read_csv('file',encoding = "utf-8")

来读取

没有用耶,不知道为什么换成了这个就好了

df = pd.read_csv('file_name.csv',engine = 'python')

 

相关文章

转载:一文讲述Pandas库的数据读取、数据获取、数据拼接、数...
Pandas是一个开源的第三方Python库,从Numpy和Matplotlib的基...
整体流程登录天池在线编程环境导入pandas和xrld操作EXCEL文件...
 一、numpy小结             二、pandas2.1为...
1、时间偏移DateOffset对象DateOffset类似于时间差Timedelta...
1、pandas内置样式空值高亮highlight_null最大最小值高亮背景...