ImportError: cannot import name 'Timestamp'

I completely agree with @Srikar Appalaraju. Additionally, update the line 81 in utils.py (path is .../site-packages/ggplot/utils.py) from "pd.tslib.Timestamp" to "pd.Timestamp" to remove FutureWarning.


@Liaoming999 is correct but adding more changes to resolve this problem:

  1. Open file ../site-packages/ggplot/stats/smoothers.py
  2. Change from pandas.lib import Timestamp to from pandas import Timestamp in line 4
  3. Change pd.tslib.Timestamp to pd.Timestamp in line 14.
  4. Save the file
  5. Open file ../site-packages/ggplot/utils.py and goto line 81 and do the same as step 3. Thanks to @wmsmith for this tip.

p.s.: General advise is to use Anaconda or some Virtual env.


I encountered the same problem after upgrading to pandas 0.23 on a databricks server.

Had to come up with this command-line solution using the unix sed tool:

cd .../python/lib/python3.5/site-packages/ggplot/stats/
sed -i 's/pandas.lib/pandas/g' smoothers.py

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.