在PyQt5中使用Pandas时的几个坑

Python93

最近在看Python GUI编程,在用到PyQt5+Pandas时遇到一些问题。这里把问题和解决方法整理一下。备查。
(好像不能上传附件,内容只好写在下面了。)

在PyQt5中使用Pandas时需要的模块库为:qtpandas,版本为1.0.4以上,才支持PyQt5。安装过程不说了,找各种方法安装吧。
安装完成后,为检测是否安装成功,运行qtpands提供的例子:BasicExample.py,过程中暴露出很多问题。

1. 无法从pandas.tslib中加载NaTType

报错模块:EditDialogs.py
模块位置:

2. 'DataFrame' object has no attribute 'ix'

解决上述错误后,运行示例并显示初始界面,但在数据加载过程中会报告错误。

[En]

After solving the above errors, run the example and display the initial interface, but an error is reported during the data loading process.

错误信息:'DataFrame' object has no attribute 'ix'
报错模块:DataFrameModel.py
模块位置:

3.

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长