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()