Meta tags:
description= The interactive graphing library for Python :sparkles: - Fix timezone-aware DatetimeIndex converting to an object array by somaz94 · Pull Request #5870 · plotly/plotly.py;
Headings (most frequently used words):
uh, oh, to, fix, aware, an, navigation, somaz94, commented, nov, 2026, timezone, datetimeindex, converting, object, array, plotly, py, tz, branch, footer, loading, this, 5870, menu, repository, 5870somaz94, wants, merge, commits, intoplotly, mainplotly, mainfrom, datetimeindexsomaz94, datetimeindexcopy, head, name, clipboard, conversation, edited, there, was, error, while, please, reload, page, link, issue, description, of, change, demo, testing, strategy, ai, assistance, guidelines, marcogorelli, has, not, been, deployed, reviewers, assignees, labels, projects, milestone, development, participants,
Text of the page (most frequently used words):
the (34), and (24), this (23), aware (19), datetimeindex (15), that (14), somaz94 (14), #plotly (14), github (13), timezone (12), applied (11), index (11), for (10), while (9), code (9), reload (9), fix (9), pandas (8), with (8), series (8), object (8), array (8), copy (8), suggestion (7), cannot (7), please (7), suggestions (7), pull (7), changes (7), loading (7), not (6), 2026 (6), request (6), there (6), was (6), error (6), page (6), all (6), main (6), you (5), security (5), from (5), change (5), add (5), one (5), sign (5), 5870 (5), changelog (5), can (4), now (4), existing (4), figure (4), to_json (4), have (4), something (4), path (4), output (4), datetime64 (4), link (4), nov (4), another (4), added (4), converting (4), commits (4), tests (4), your (4), support (4), copilot (4), time (3), navigation (3), merge (3), line (3), batch (3), commit (3), only (3), these (3), yet (3), already (3), conversation (3), hidden (3), characters (3), unicode (3), review (3), learn (3), branch (3), sorry (3), went (3), wrong (3), reactions (3), marcogorelli (3), out (3), compared (3), also (3), could (3), markdown (3), commented (3), fixes (3), documentation (3), nat (3), draft (3), into (3), quality (3), tab (3), window (3), refresh (3), session (3), developers (3), customer (3), enterprise (3), grade (3), features (3), build (3), community (2), status (2), footer (2), reviews (2), has (2), been (2), single (2), were (2), may (2), issues (2), development (2), milestone (2), none (2), projects (2), file (2), bidirectional (2), text (2), than (2), what (2), more (2), about (2), thanks (2), cleaner (2), switched (2), takes (2), comes (2), applies (2), every (2), types (2), against (2), nullable (2), goes (2), nan (2), same (2), them (2), float64 (2), int64 (2), 63c1771 (2), down (2), then (2), issue (2), entry (2), reviewed (2), guidelines (2), test (2), myself (2), without (2), checks (2), after (2), 019 (2), which (2), null (2), indexes (2), json (2), see (2), 2024 (2), 30t12 (2), wants (2), head (2), name (2), clipboard (2), insights (2), actions (2), 649 (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), business (2), products (2), secret (2), perform, action, share, personal, information, manage, cookies, contact, docs, privacy, terms, inc, right, check, back, later, queued, multi, comments, pending, marked, resolved, outdated, must, order, create, valid, applying, deleted, lines, supported, per, viewing, subset, closed, invalid, because, made, participants, bug, makes, creation, 30x, slower, successfully, merging, close, labels, assigned, assignees, reviewers, account, comment, join, free, show, contains, interpreted, compiled, differently, appears, below, open, editor, reveals, deployments, deployed, reaction, reacted, hooray, emoji, works, since, timing, previous, version, workflows, run, someone, approve, author, send, just, might, special, casey, fancy, trying, seeing, isinstance, to_series, solution, think, like, contributor, referenced, 750bce4, oss, contributions, overrides, feat, 727807b, aaefe4f, november, needed, required, prs, confirm, follows, conduct, used, claude, investigation, result, will, answer, questions, assistance, its, wall, clock, values, fails, both, pass, locally, test_init, test_optional, test_io, test_plotly_utils, test_core, testing, strategy, before, 285, 353, 008, 007, 100, 000, points, python, orjson, installed, best, five, runs, demo, behavior, reported, proposes, lands, follow, further, here, 5831, 5829, matches, engine, becomes, written, rather, where, reader, difference, but, did, compare, rendering, browser, customdata, 000000, covers, type, does, passes, through, unchanged, turned, timestamps, deep, copied, encoded, converts, first, suggested, removes, zone, copy_to_readonly_numpy_array, from_native, description, 5864, closes, edited, files, changed, items, requests, message, dismiss, alert, accounts, appearance, settings, search, pricing, event, talks, workshops, next, partners, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, ons, trust, why, evaluate, industries, government, manufacturing, financial, services, healthcare, industry, nonprofits, startups, team, enterprises, stage, businesses, source, latest, improvements, across, place, developer, articles, sponsors, trending, repos, explore, customize, certifications, scanning, leak, prevention, protection, vulnerability, detection, remediation, secure, cloud, environments, codespaces, analysis, enforcement, automation, ship, coding, agent, tasks, automated, work, hosting, collaboration, platform, menu, skip, content,
Text of the page (random words):
fix timezone aware datetimeindex converting to an object array by somaz94 pull request 5870 plotly plotly py github skip to content navigation menu sign in products platform github repository hosting code review and collaboration copilot ai coding agent for tasks projects and automated work build ship actions ci cd and automation code quality quality analysis fixes and enforcement codespaces cloud development environments secure code security vulnerability detection and remediation secret protection secret scanning and leak prevention all features developers learn documentation training certifications build build with copilot customize copilot integrations explore trending repos github sponsors developer articles changelog changelog your source for the latest features improvements and fixes across github products all in one place businesses by stage enterprises team startups nonprofits by industry healthcare financial services manufacturing government see all industries evaluate github why github customer stories business insights trust center add ons github advanced security enterprise grade code security copilot for business enterprise grade ai features premium support enterprise grade 24 7 support resources learn connect documentation resource center blog events webinars community forum customer stories integrations support customer support training github status company about partners changelog github universe github universe the event for developers by developers talks workshops and what s next for github pricing search sign in sign up appearance settings you signed in with another tab or window reload to refresh your session you signed out in another tab or window reload to refresh your session you switched accounts on another tab or window reload to refresh your session dismiss alert message plotly plotly py repository navigation code issues 649 649 pull requests 87 87 actions security and quality insights more items fix timezone aware datetimeindex converting to an object array 5870 5870 draft somaz94 wants to merge 3 commits into plotly main plotly plotly py main from somaz94 fix tz aware datetimeindex somaz94 plotly py fix tz aware datetimeindex copy head branch name to clipboard conversation commits 3 3 checks files changed draft fix timezone aware datetimeindex converting to an object array 5870 somaz94 wants to merge 3 commits into plotly main plotly plotly py main from somaz94 fix tz aware datetimeindex somaz94 plotly py fix tz aware datetimeindex copy head branch name to clipboard conversation somaz94 commented nov 4 2026 edited loading uh oh there was an error while loading please reload this page copy link copy markdown link to issue closes 5864 description of change a timezone aware datetimeindex passes through nw from_native unchanged so np array turned it into an object array of timestamps that were then deep copied and encoded one at a time copy_to_readonly_numpy_array now converts a pandas index to a series first as marcogorelli suggested so it takes the existing series path which already removes the time zone this covers every index so i compared 17 index types against main on pandas 3 0 2 only the timezone aware datetimeindex output changes on pandas 1 5 3 a nullable int64 index also changes from an object array to float64 with nan as a series of that type already does this changes the output for these indexes so that it matches a timezone aware series with the json engine 2024 03 30t12 00 00 01 00 becomes 2024 03 30t12 00 00 000000 and nat is written as nat rather than null the same applies to text and customdata where a reader could see the difference i compared the json but did not compare rendering in a browser the nat output is the behavior reported in 5829 which the draft 5831 proposes to change to null if that lands these indexes follow it without further changes here demo 100 000 points on python 3 12 and pandas 3 0 2 with orjson installed best of five runs before tz aware index object figure 0 285 s to_json 0 353 s after tz aware index datetime64 us figure 0 019 s to_json 0 008 s after tz aware series datetime64 us figure 0 019 s to_json 0 007 s testing strategy i added a test that a timezone aware datetimeindex comes out as datetime64 with its wall clock values it fails without the change tests test_core tests test_plotly_utils tests test_io tests test_optional and both test_init checks pass locally ai assistance i used claude code for the investigation the change and the test i reviewed the result myself and will answer review questions myself guidelines i have reviewed the pull request guidelines and the code of conduct and confirm that this pr follows them i have added an entry to the changelog if needed not required for documentation prs sorry something went wrong uh oh there was an error while loading please reload this page all reactions somaz94 added 2 commits november 4 2026 16 35 fix timezone aware datetimeindex converting to an object array aaefe4f add changelog entry for timezone aware datetimeindex fix 727807b somaz94 added a commit to somaz94 somaz94 that referenced this pull request nov 4 2026 feat add plotly plotly py 5870 to oss contributions overrides 750bce4 marcogorelli commented nov 4 2026 copy link copy markdown contributor thanks somaz94 this is one solution i think another could be to do something like if isinstance x pd index x x to_series then it just goes down the existing series path that might be cleaner and special casey fancy trying it and seeing if it also fixes the issue all reactions sorry something went wrong uh oh there was an error while loading please reload this page send a pandas index down the existing series path 63c1771 somaz94 commented nov 5 2026 copy link copy markdown author thanks that works and it is cleaner so i switched to it in 63c1771 a timezone aware datetimeindex now takes the series path and comes out as datetime64 since this now applies to every index i compared 17 index types against main on pandas 3 0 2 only the timezone aware datetimeindex output changes and on pandas 1 5 3 a nullable int64 index also goes from an object array to float64 with nan timing is the same as the previous version the workflows have not run on this pr yet could someone approve them 1 marcogorelli reacted with hooray emoji all reactions 1 reaction sorry something went wrong uh oh there was an error while loading please reload this page this branch has not been deployed no deployments this file contains hidden or bidirectional unicode text that may be interpreted or compiled differently than what appears below to review open the file in an editor that reveals hidden unicode characters learn more about bidirectional unicode characters show hidden characters sign up for free to join this conversation on github already have an account sign in to comment reviewers no reviews uh oh there was an error while loading please reload this page assignees no one assigned labels none yet projects none yet milestone no milestone development successfully merging this pull request may close these issues bug timezone aware pandas datetimeindex as x makes figure creation and to_json 30x slower uh oh there was an error while loading please reload this page 2 participants add this suggestion to a batch that can be applied as a single commit this suggestion is invalid because no changes were made to the code suggestions cannot be applied while the pull request is closed suggestions cannot be applied while viewing a subset of changes only one suggestion per line can be applied in a batch add this suggestion to a batch that can be applied as a single commit applying suggestions on deleted lines is not supported you must change the existing code in this line in order to create a valid suggestion outdated suggestions cannot be applied this suggestion has been applied or marked resolved suggestions cannot be applied from pending reviews suggestions cannot be applied on multi line comments suggestions cannot be applied while the pull request is queued to merge suggestion cannot be applied right now please check back later footer 2026 github inc footer navigation terms privacy security status community docs contact manage cookies do not share my personal information you can t perform that action at this time
|