关系数据可视化出现的问题解决

1、出现错误

AttributeError: module 'pandas' has no attribute 'tslib

解决方案:
找到你ggplot包中的utils.py模块,把pd.tslib.Timestamp 改为pd.Timestamp
2.出现错误

No module named 'pandas.lib'

解决方案:
在ggplot包中stats目录下找到smoothers.py模块,把

from pandas.lib import Timestamp

改为

  from pandas import Timestamp

 pd.tslib.Timestamp 

改为

pd.Timestamp

3.出现错误

'DataFrame' object has no attribute 'sort'

解决方案:
第一、在ggplot包中,…Lib/site-packages/ggplot/stats/stat_smooth.py下改变77行:

smoothed_data = smoothed_data.sort(‘x’) 

改变为:

smoothed_data = smoothed_data.sort_values(‘x’)

第二、在ggplot包中,…/Lib/site-packages/ggplot/ggplot.py下改变602行:

fill_levels = self.data[[fillcol_raw, fillcol]].sort(=fillcol_raw)[fillcol].unique() 

改变为:

fill_levels = self.data[[fillcol_raw, fillcol]].sort_values(by=fillcol_raw)[fillcol].unique()
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值