Open panzerstadt opened 6 years ago
Anyway this could be merged @glamp?
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
The deprecation message is not great advice, the public interface is pandas.Timstamp so this PR is doing the right thing. I don't think there's anything wrong with doing a try / catch for library imports but in this case I don't see it breaking backwards compatibility. I can see pandas.Timestamp mentioned back in v0.13 which is very old indeed http://pandas.pydata.org/pandas-docs/version/0.13/10min.html?highlight=timestamp
I've tested it against 0.19.0 as well and the import works fine as per this patch
>>> import pandas as pd
>>> pd.__version__
u'0.19.0'
>>> from pandas import Timestamp
>>>
Note, there's a second deprecation message that comes from running gglplot's smoothers.py
:
FutureWarning: pandas.tslib is deprecated and will be removed in a future version.
This is from line 14. It hasn't been removed from Pandas yet but will cause a similar issue that this PR addresses.
Please merge this to align with recent panda changes.
Please merge this -- I am unable to use ggplot
without manually having to edit the installed module 😢
Can we please merge this?
pandas 0.23.0 ggplot 0.11.5
changed
from pandas.lib import Timestamp
tofrom pandas import Timestamp
, might break compability with old pandas.an alternative may be to do a try except....? which might look pretty bad, but I haven't really researched into how to support multiple pandas versions with different import endpoints.
reference: https://stackoverflow.com/questions/50591982/importerror-cannot-import-name-timestamp