Skip to content

Conversation

@panzerstadt
Copy link

pandas 0.23.0
ggplot 0.11.5

changed from pandas.lib import Timestamp to from 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

pandas 0.23.0
ggplot 0.11.5

changed `from pandas.lib import Timestamp` to `from 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
@lukesmurray
Copy link

Anyway this could be merged @glamp?

@ghost
Copy link

ghost commented Jun 15, 2018

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.

@Ozeidi
Copy link

Ozeidi commented Jul 19, 2018

Please merge this to align with recent panda changes.

@whyboris
Copy link

Please merge this -- I am unable to use ggplot without manually having to edit the installed module 😢

@sushinoya
Copy link

Can we please merge this?

@sushinoya sushinoya mentioned this pull request Oct 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants