Error on executing from ggplot import mtcars


#1

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?


#2

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

Thank you for explaining it so clearly.


#4

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

import ggplot
from ggplot import mtcars

#5

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


Error on executing from ggplot import mtcars (warning now an error)
#6

This is a snapshot of the error: @abhinavsingh