Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Made datetime handling in plotting code more general #1098

Merged
merged 3 commits into from
Feb 2, 2017

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Feb 2, 2017

Improves datetime handling for datetime.datetime and pd.tslib.Timestamp types. Needs a bunch of unit tests.

@philippjfr
Copy link
Member Author

Very happy with this refactor the code is no longer duplicated and now handles datetime types more consistently. Also added a bunch of unit tests just now. Ready to merge when tests pass.

@jlstevens
Copy link
Contributor

Ok, the tests have now passed. The changes look good and I am very happy to see the code simplified and the addition of new tests.

Merging.

@jlstevens jlstevens merged commit 68c6af8 into master Feb 2, 2017
@philippjfr philippjfr deleted the datetime_handling branch February 10, 2017 01:00
@stonebig
Copy link
Contributor

stonebig commented Apr 22, 2017

hi small remark. testing with holoviews latest build, I get this error:

  • holoviews-1.7.dev8-py3-none-any.whl
  • pandas-0.20.0rc1-cp35-cp35m-win_amd64.whl
# Holoviews 
# for more example, see http://holoviews.org/Tutorials/index.html
import holoviews as hv
%load_ext holoviews.ipython
fractal = hv.Image(image)

((fractal * hv.HLine(y=0.16)).hist() + fractal.sample(y=0.16))
C:\WinPython\basedir35\buildQt5\winpython-64bit-3.5.x.2\python-3.5.3.amd64\lib\site-packages\holoviews\core\util.py:26: FutureWarning: pandas.tslib is deprecated and will be removed in a future version.
You can access Timestamp as pandas.Timestamp
  datetime_types = datetime_types + (pd.tslib.Timestamp,)

..; and the image is not displayed (on Jupyterlab-0.20.0), but that may not be an holoviews problem

@philippjfr
Copy link
Member Author

Thanks for the note, I'll make a PR with the fix now.

@stonebig
Copy link
Contributor

further down, i see errors in statsmodels "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"... maybe a full check would be nice

@philippjfr
Copy link
Member Author

further down, i see errors in statsmodels "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"... maybe a full check would be nice

Could this be triggered by some other dependency? I think it's probably seaborn, because holoviews does not import statsmodels directly.

@stonebig
Copy link
Contributor

it's not triggered by holloviews, just meant that there may be a lot more deprecation warnings to chaze per holoviews with pandas-0.20.0rc1

@philippjfr
Copy link
Member Author

I see, yes that makes sense, I'll try it out.

@stonebig
Copy link
Contributor

oups ! it's a new kind of deprecation for me "FutureWarning". I new "DeprecationWarning" and "UserWarning" up to now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants