Meta tags:
description= Description At 38374ac, a NaT inside a datetime64 array serializes as the string NaT on both engines. The same missing value as a list element or a scalar becomes null, and from_json reads the string back as data. $ python -I repro.py ...;
Headings (most frequently used words):
commented, on, 2026, navigation, oct, nat, description, metadata, footer, camdecoster, 22, bug, inside, datetime64, array, serializes, as, the, string, instead, of, null, 5829, menu, repository, activity, issue, actions, screenshots, video, steps, to, reproduce, notes, 20, chrikrah, senanurcetin, nov, assignees, labels, type, projects, milestone, relationships, development,
Text of the page (most frequently used words):
the (33), nat (29), for (19), json (19), and (18), null (16), 2020 (16), github (14), series (14), 01t00 (14), none (13), orjson (13), 000000 (12), 2026 (11), you (10), round (10), #plotly (10), #string (9), datetime64 (9), this (8), actions (8), camdecoster (8), oct (8), that (7), issue (7), inside (7), your (7), open (6), something (6), broken (6), bug (6), backlog (6), 5831 (6), scalar (6), with (6), code (6), figure (6), print (6), engine (6), data (6), security (5), copilot (5), sign (5), test_utils (5), array (5), more (5), fig (5), pio (5), list (5), import (5), not (4), already (4), same (4), tests (4), numpy (4), commented (4), all (4), serializes (4), support (4), navigation (3), projects (3), type (3), size (3), what (3), happy (3), asserts (3), should (3), own (3), contributor (3), senanurcetin (3), where (3), from (3), reads (3), chrikrah (3), filter (3), both (3), python (3), repro (3), _json (3), datetime_as_string (3), dtype (3), to_json (3), copy (3), link (3), 5829 (3), instead (3), quality (3), another (3), tab (3), window (3), refresh (3), session (3), reload (3), developers (3), changelog (3), customer (3), enterprise (3), grade (3), features (3), build (3), community (2), status (2), footer (2), pull (2), requests (2), development (2), milestone (2), labels (2), one (2), metadata (2), have (2), account (2), join (2), review (2), today (2), out (2), test_optional (2), only (2), author (2), above (2), discussion (2), words (2), nov (2), agent (2), issues (2), 276 (2), daily (2), chart (2), how (2), missing (2), gap (2), looks (2), back (2), such (2), dash (2), state (2), gets (2), belongs (2), case (2), next (2), grep (2), utils (2), 297 (2), 517 (2), obj (2), tolist (2), else (2), return (2), goes (2), through (2), from_json (2), to_json_plotly (2), fig2 (2), loads (2), scatter (2), stored (2), pandas (2), 38374ac (2), description (2), new (2), insights (2), 649 (2), repository (2), signed (2), universe (2), training (2), integrations (2), stories (2), center (2), documentation (2), learn (2), business (2), fixes (2), products (2), secret (2), can, perform, action, time, share, personal, information, manage, cookies, contact, docs, privacy, terms, inc, app, branches, yet, relationships, assigned, assignees, comment, conversation, free, want, mark, ready, prefer, different, representation, think, isn, worth, changing, adjust, close, context, maps, applies, result, values, arrays, standard, encoders, units, those, come, encode_as_pandas, dumps, cls, plotlyjsonencoder, question, intended, output, serialize, reporter, disclosure, per, note, drafted, reply, assistant, claude, posting, under, continue, appears, response, was, written, bot, posing, user, while, don, frown, created, prs, identified, ask, humans, communicating, using, won, responding, reach, small, fits, stay, because, promises, waits, thread, does, match, emit, honestly, use, mine, broke, tested, figures, timestamps, survive, trip, draws, screen, fine, added, thanks, report, could, please, explain, encountered, usage, activity, codeowners, entry, covers, these, paths, would, take, sites, test_pandas_json_encoding, too, reverted, four, lines, again, fallback, when, absent, call, unfiltered, clean_to_json_compatible, _plotly_utils, encode_as_numpy, auto, object, breaks, promise, test_io, test_to_from_plotly_json, 265, 291, contract, notes, timestamp, __name__, to_datetime, graph_objects, steps, reproduce, defect, serialized, quoted, screenshots, video, happens, draw, right, anything, ndarray, engines, value, element, becomes, body, opened, items, message, dismiss, alert, switched, accounts, appearance, settings, search, pricing, event, talks, workshops, partners, about, company, forum, events, webinars, blog, resource, connect, resources, premium, advanced, add, ons, trust, why, evaluate, see, 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, tasks, automated, work, hosting, collaboration, platform, menu, skip, content,
Text of the page (random words):
bug nat inside a datetime64 array serializes as the string nat instead of null issue 5829 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 bug nat inside a datetime64 array serializes as the string nat instead of null 5829 new issue copy link new issue copy link open open bug nat inside a datetime64 array serializes as the string nat instead of null 5829 copy link labels p3 backlog backlog bug something broken something broken size 1 description chrikrah opened on oct 20 2026 issue body actions description at 38374ac a nat inside a datetime64 array serializes as the string nat on both engines the same missing value as a list element or a scalar becomes null and from_json reads the string back as data python i repro py 38374ac pandas 3 0 6 numpy 2 5 4 orjson 3 13 0 stored ndarray datetime64 us json series 2020 01 01t00 00 00 000000 nat json list 2020 01 01t00 00 00 none json scalar null json round 2020 01 01t00 00 00 000000 nat orjson series 2020 01 01t00 00 00 000000 nat orjson list 2020 01 01t00 00 00 none orjson scalar null orjson round 2020 01 01t00 00 00 000000 nat plotly js happens to draw a gap for the string so a chart looks right anything else that reads the figure json such as dash figure state gets a string where null belongs screenshots video none the defect is in the serialized json quoted above steps to reproduce import json import pandas as pd import plotly graph_objects as go import plotly io as pio from plotly io _json import to_json_plotly series pd series pd to_datetime 2020 01 01 none fig go figure go scatter x series print stored type fig data 0 x __name__ fig data 0 x dtype fig2 go figure go scatter x pd timestamp 2020 01 01 pd nat for e in json orjson print e series json loads pio to_json fig engine e data 0 x print e list json loads pio to_json fig2 engine e data 0 x print e scalar to_json_plotly pd nat engine e print e round list pio from_json pio to_json fig engine e engine e data 0 x notes contract tests test_optional test_utils test_utils py 276 already asserts null for pd nat inside an object dtype series and 291 asserts null for pd nat the datetime64 dtype of that same series breaks the promise the scalar case is tests test_io test_to_from_plotly_json py 265 the json engine the auto fallback when orjson is absent goes through encode_as_numpy at _plotly_utils utils py 297 and orjson goes through clean_to_json_compatible at plotly io _json py 517 both call datetime_as_string unfiltered return numpy datetime_as_string obj tolist return none if s nat else s for s in numpy datetime_as_string obj tolist python i repro py grep e series round filter at utils py 297 only json series 2020 01 01t00 00 00 000000 none json round 2020 01 01t00 00 00 000000 none orjson series 2020 01 01t00 00 00 000000 nat orjson round 2020 01 01t00 00 00 000000 nat python i repro py grep e series round same filter at _json py 517 too json series 2020 01 01t00 00 00 000000 none json round 2020 01 01t00 00 00 000000 none orjson series 2020 01 01t00 00 00 000000 none orjson round 2020 01 01t00 00 00 000000 none reverted all four lines print nat again no codeowners entry covers these paths camdecoster would you take a pr with the filter at both sites and a datetime64 case next to test_pandas_json_encoding activity camdecoster commented on oct 20 2026 camdecoster on oct 20 2026 contributor more actions thanks for the report could you please explain how you encountered this in your daily usage camdecoster added bug something broken something broken p3 backlog backlog size 1 on oct 20 2026 chrikrah commented on oct 22 2026 chrikrah on oct 22 2026 author more actions camdecoster honestly not from daily use and no chart of mine broke i tested how figures with missing timestamps survive a json round trip plotly js draws a gap for the string so the screen looks fine code that reads the figure json back such as dash figure state gets nat where null belongs the reach is small and p3 fits the issue should stay open because test_utils py 276 already promises null for pd nat 5831 from senanurcetin waits on this thread does null match what 5831 should emit for pd nat camdecoster commented on oct 22 2026 camdecoster on oct 22 2026 contributor more actions it appears that this response was written by a bot posing as a user while we don t frown on agent created issues prs where that is identified we ask that humans do the communicating if you re open to using your own words to have this discussion we re happy to join if not we won t be responding senanurcetin commented on nov 4 2026 senanurcetin on nov 4 2026 contributor more actions hi camdecoster i m the author of 5831 not the issue reporter disclosure per your note above i drafted this reply with an ai assistant claude and i m posting it under my own account happy to continue the discussion in my own words the open question for 5831 is only the intended output should a nat inside a numpy datetime64 array serialize as json null for context scalar pd nat already maps to null today tests test_optional test_utils test_utils py asserts json dumps pd nat cls plotlyjsonencoder null and encode_as_pandas pd nat is none 5831 applies the same result to nat values inside datetime64 arrays standard and orjson encoders with tests for d us ns units today those come out as the string nat if null is what you want i ll mark 5831 ready for review if you d prefer a different representation or think this isn t worth changing i m happy to adjust the pr or close it sign up for free to join this conversation on github already have an account sign in to comment metadata metadata assignees no one assigned labels p3 backlog backlog bug something broken something broken size 1 type no type projects no projects milestone no milestone relationships none yet development no branches or pull requests issue actions open in github copilot app 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
|