Title: Recognize pandas Timestamp objects for DateConverter? · Issue #10533 · matplotlib/matplotlib · GitHub
Open Graph Title: Recognize pandas Timestamp objects for DateConverter? · Issue #10533 · matplotlib/matplotlib
X Title: Recognize pandas Timestamp objects for DateConverter? · Issue #10533 · matplotlib/matplotlib
Description: I am testing matplotlib 2.2rc from a point of view of "what if pandas no longer registers its unit converters", and one of the issues raised when we temporarily did that for the 0.21.0 release was the following (pandas-dev/pandas#18283):...
Open Graph Description: I am testing matplotlib 2.2rc from a point of view of "what if pandas no longer registers its unit converters", and one of the issues raised when we temporarily did that for the 0.21.0 release was ...
X Description: I am testing matplotlib 2.2rc from a point of view of "what if pandas no longer registers its unit converters", and one of the issues raised when we temporarily did that for the 0.21.0 re...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/10533
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Recognize pandas Timestamp objects for DateConverter?","articleBody":"I am testing matplotlib 2.2rc from a point of view of \"what if pandas no longer registers its unit converters\", and one of the issues raised when we temporarily did that for the 0.21.0 release was the following (https://github.com/pandas-dev/pandas/issues/18283):\r\n\r\n**Code for reproduction**\r\n\r\n```python\r\nimport pandas as pd\r\nimport matplotlib.pyplot as plt\r\n\r\npd.plotting.deregister_matplotlib_converters()\r\n\r\nxticks = pd.date_range(start=\"10/10/2017\", end=\"11/11/2017\",\r\n freq='D')\r\nplt.xticks(xticks, xticks.strftime(\"%a %m-%d\"))\r\n```\r\n\r\n**Actual outcome**\r\n\r\nThe above raises `TypeError: Cannot compare type 'Timestamp' with type 'float'`, because Timestamps are not recognized to use the `DateConverter` in the units framework.\r\n\r\nWould it be possible to consider adding pandas Timestamps to the unit registry? It are subclasses of `datetime.datetime`, so code-wise it should not be hard to add support.\r\n\r\n**Matplotlib version**\r\n\u003c!--Please specify your platform and versions of the relevant libraries you are using:--\u003e\r\n * Operating system: Linux\r\n * Matplotlib version: '2.2.0rc1'\r\n * Python version: 3.5","author":{"url":"https://github.com/jorisvandenbossche","@type":"Person","name":"jorisvandenbossche"},"datePublished":"2018-02-19T17:30:18.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":24},"url":"https://github.com/10533/matplotlib/issues/10533"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:aefe7410-4778-069e-f612-9e6092525f3c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9322:6F8B4:8C2D5E:BCDA0A:6A56A2A4 |
| html-safe-nonce | f7580a8a3d71b76221b1d77097256f2a03f66d12829c305272b894f413dd44cb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzIyOjZGOEI0OjhDMkQ1RTpCQ0RBMEE6NkE1NkEyQTQiLCJ2aXNpdG9yX2lkIjoiODA4NDY1MzYwODYyNzc3NDExNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b9adcddbfbb310a6eb5218495fea85536c8bbf6c6c8cac27abece8ac21fed325 |
| hovercard-subject-tag | issue:298353527 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/10533/issue_layout |
| twitter:image | https://opengraph.githubassets.com/964a3be906546f1910bdf79356a47bf5e824816e83d0a9a0f7103d8e73f7c7ba/matplotlib/matplotlib/issues/10533 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/964a3be906546f1910bdf79356a47bf5e824816e83d0a9a0f7103d8e73f7c7ba/matplotlib/matplotlib/issues/10533 |
| og:image:alt | I am testing matplotlib 2.2rc from a point of view of "what if pandas no longer registers its unit converters", and one of the issues raised when we temporarily did that for the 0.21.0 release was ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jorisvandenbossche |
| hostname | github.com |
| expected-hostname | github.com |
| None | 13efe7fe8ecc41eda1078cbde8206041ed92bc54e29bcb737e9353dd9c407aad |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5466ebe023a0abf876a1e6c5d7602ee8f5e6a02b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width