![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Python常见错误
文章平均质量分 53
ymd8005
机器学习、数据挖掘
展开
-
Python any函数
(a.loc[i,['Count']]==y_count[1])#输出#Out[391]: #Count True#Name: 1, dtype: bool if(a.loc[i,['Count']]==y_count[1]):print("da")Traceback (most recent call last): File "", line 1, in原创 2016-03-31 17:45:08 · 1071 阅读 · 0 评论 -
Python中遇到"UnicodeDecodeError: ‘gbk’ codec can’t decode bytes in position 2-3: illegal multibyte sequ
【背景】问题参见:python2.7 urllib2 抓取新浪乱码中的:报错的异常是 UnicodeDecodeError: ‘gbk’ codec can’t decode bytes in position 2-3: illegal multibyte sequence此问题,还是很具有代表性的,此处,专门整理如下转载 2016-04-01 09:04:26 · 2330 阅读 · 0 评论 -
python2 打不开中文文件
#!/usr/bin/env python# -*- coding:utf-8 -*-f=open(u"C:/Users/John/Desktop/印象笔记/3学.txt",'r')content = f.readlines()f.close()print (''.join(content))#!/usr/bin/env python# -*- coding:utf-8 -*-原创 2018-01-29 12:47:06 · 1421 阅读 · 0 评论 -
python安装mysql-python或者python安装mysqlclient
python安装mysql-python或者python安装mysqlclient报错: C:\Users\John\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\amd64\cl.exe /c /nologo /Ox /MD /W3 /GS- /DNDEBUG -Dversi原创 2018-02-07 16:06:59 · 17052 阅读 · 1 评论