Error on executing from ggplot import mtcars

When we execute from ggplot import mtcars it gives the following errors.

/usr/local/anaconda/envs/py36/lib/python3.6/site-packages/ggplot/utils.py:81: FutureWarning: pandas.tslib is deprecated and will be removed in a future version.
You can access Timestamp as pandas.Timestamp
pd.tslib.Timestamp,
/usr/local/anaconda/envs/py36/lib/python3.6/site-packages/ggplot/stats/smoothers.py:4: FutureWarning: The pandas.lib module is deprecated and will be removed in a future version. These are private functions and can be accessed from pandas._libs.lib instead
from pandas.lib import Timestamp
/usr/local/anaconda/envs/py36/lib/python3.6/site-packages/statsmodels/compat/pandas.py:56: FutureWarning: The pandas.core.datetools module is deprecated and will be removed in a future version. Please use the pandas.tseries module instead.
from pandas.core import datetools

But when we execute the same cell again, it does not give the error… why?

Hi @Kamal_Upadhyay,

These are warnings, not errors. Some of the functions are deprecated and will be removed in the future versions, hence the warning.

Since mtcars will already be loaded that is why warnings are not getting displayed when we execute the same cell again

Hope this helps

Thanks

3 Likes

Thank you for explaining it so clearly.

for me, there was no warning or errors when I imported ggplot first before importing mtcars.

import ggplot
from ggplot import mtcars

G’day Abhinav, @abhinav am having difficulties due to dependencies “behind the scenes” of this command.
Apparently, in the “smoothers” function in ggplot, there is reference to pandas.lib to import Timestamp

from pandas.lib import Timestamp

but this is no longer correct. Instead Timestamp can be retrieved from pandas directly. This problem is addressed in the following forum,

and I have corrected this on my local machine, however the cloud jupyter still picks up this error.

Any suggestions of how I can work around it?

Regards
Elizabeth

This is a snapshot of the error: @abhinavsingh