栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

【数据挖掘】各种各样的错误(python)

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

【数据挖掘】各种各样的错误(python)

文章目录
  • 【错误1】raise ParserError("Unknown string format: %s", timestr)
  • 【错误2】Excel file format cannot be determined, you must specify an engine manually.
  • 【错误3】In FT2Font: Can not load face
  • 【错误4】plt画图中文字符显示
  • 【错误5】plt画图不显示负号
  • 【错误6】No module named 'matplotlib_inline'

【错误1】raise ParserError(“Unknown string format: %s”, timestr)

> File “D:ProgramsMiniconda3envspytorchlibsite-packagesdateutilparser_parser.py”,
line 643, in parse
raise ParserError(“Unknown string format: %s”, timestr) dateutil.parser._parser.ParserError: Unknown string format:
2010-05-26,三

【解决】

df.index=pd.to_datetime(df.index,errors='ignore')

更建议对日期做一下处理再转换,不然做时间序列分析的时候可能会不得劲。

【错误2】Excel file format cannot be determined, you must specify an engine manually.

【原因】

1.可能有其他的软件正在使用这个文件。

【解决】

1.关闭其他使用的软件
2.另存csv

【错误3】In FT2Font: Can not load face

【原因】

1.可能字体文件损坏

【解决】

到matplotlib库 *Libsite-packagesmatplotlibmpl-datafontsttf 中检查是否有字体大小为0kb
如有,可以去网上下载一个替换

【错误4】plt画图中文字符显示

【解决】

设置字体
plt.rcParams[‘font.family’] = ‘SimHei’

【错误5】plt画图不显示负号

【解决】

plt.rcParams[‘axes.unicode_minus’] =False

【错误6】No module named ‘matplotlib_inline’

首先进入anaconda3存放所有库的文件夹,一般是anaconda3Libsite-packages,是你的home文件夹。进入该文件夹之后,用gitbash下载github上的matplotlib_inline库
$ git clone https://github.com/ipython/matplotlib-inline

下载之后,进入matplotlib-inline 将matplotlib_inline文件夹复制到~anaconda3Libsite-packages(为了使d2l可以找到该库)

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/977583.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号