首先
pip install ggplot
因为新安装的版本比较高,原来的没有维护了,所以需要修改一些配置
我这里pycharm的运行环境是Python,所以安装ggplot时,会安装在Python下,如果选择的运行环境是anaconda,ggplot在anaconda下
第一个问题
AttributeError: module 'pandas' has no attribute 'tslib'
解决方法
python\location\Lib\site-packages\ggplot\utils.py
date_types = (
pd.tslib.Timestamp,
pd.DatetimeIndex,
pd.Period,
pd.PeriodIndex,
datetime.datetime,
datetime.time
)
改为
date_types =