ImportError: cannot import name 'Timestamp'

Krantz picture Krantz · May 29, 2018 · Viewed 20k times · Source

I have ggplot successfully installed in my python 3.6.3 using the code below:

conda install -c conda-forge ggplot 

But when I import it in my notebook using the code below, I get an error:

from ggplot import *
ImportError: cannot import name 'Timestamp'

I would appreciate any idea on how I can solve this problem.

Answer

liaoming999 picture liaoming999 · May 30, 2018

I have encountered the same problem.

Please go to .../site-packages/ggplot/stats/smoothers.py and change

from pandas.lib import Timestamp

to

from pandas import Timestamp

and save.