Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
DOC: add FAQ about np.datetime64 #5625
Conversation
tacaswell
added the
needs_review
label
Dec 6, 2015
tacaswell
added this to the
Critical bugfix release (1.5.1)
milestone
Dec 6, 2015
|
and of course I targeted this at the wrong branch. |
mdboom
commented on an outdated diff
Dec 14, 2015
|
fixed and force pushed |
QuLogic
commented on an outdated diff
Dec 16, 2015
doc/faq/howto_faq.rst
| + | ||
| +For matplotlib to plot dates (or any scalar with units) a converter | ||
| +to float needs to be registered with the `matplolib.units` module. The | ||
| +current best converters for `datetime64` values are in `pandas`. Simply | ||
| +importing `pandas` :: | ||
| + | ||
| + import pandas as pd | ||
| + | ||
| +should be sufficient as `pandas` will try to install the converters | ||
| +on import. If that does not work, or you need to reset `munits.registry` | ||
| +you can explicitly install the `pandas` converters by :: | ||
| + | ||
| + from pandas.tseries import converter as pdtc | ||
| + pdtc.register() | ||
| + | ||
| +If you only want to use `pandas` converter for `datetime64` values :: |
|
|
|
Don't you need double-backticks for code samples in reST? |
|
Single backticks to their best to auto-resolve to a link to something else in the docs, double ticks just sets it in mono-typewriter. |
tacaswell
added the
Documentation
label
Dec 28, 2015
tacaswell
modified the milestone: next major release (2.0), Critical bugfix release (1.5.1)
Dec 28, 2015
|
@tacaswell, my quick testing confirms your initial comment: importing pandas is sufficient. |
|
Typo fixed and squashed. |
efiring
added a commit
that referenced
this pull request
Feb 14, 2016
|
|
efiring |
a40c9ec
|
efiring
merged commit a40c9ec
into matplotlib:master
Feb 14, 2016
efiring
removed the
needs_review
label
Feb 14, 2016
|
Should be backported? |
tacaswell
deleted the
tacaswell:faq_datetime64 branch
May 12, 2016
QuLogic
added a commit
to QuLogic/matplotlib
that referenced
this pull request
Oct 16, 2016
|
|
efiring + QuLogic |
e2fd2aa
|
|
Backported to v2.x via e2fd2aa. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tacaswell commentedDec 6, 2015
I would appreciate if someone else checked to make sure I am not lying here, but with up-to-date everything, datetime64 seems to 'just work' so long as
pandashas been imported.