Repository navigation
Conversation
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Enricoftw
force-pushed
the
timeline-fraction
branch
from
November 21, 2026 20:04
b338a97 to
4e7d41d
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Link to issue
Closes #5897
Description of change
Sub-millisecond events, such as a 500 µs event in a process log, disappear from
px.timeline, and a 1.5 ms event is drawn as 1 ms. With pandas, a 1001 ms bar can also be drawn as 1000 ms.process_dataframe_timelinecallsdt.total_milliseconds(), which drops fractions and can round down with pandas. The fix converts integer duration ticks to milliseconds, preserving fractions and missing values.Demo
Testing strategy
test_timeline_fractional_millisecondscovers fractional, whole, negative and missing durations across DataFrame constructors. It fails onmainand passes with the fix.Additional information (optional)
Bar lengths for millisecond, microsecond and nanosecond data are floats again, as in 5.24.1. #5796 by @mottopanikeiku changes the same calculation for daylight saving time. If it lands first, I'll rebase.
AI disclosure: I used Codex (GPT-6.2 Sol) and Claude Code (Claude Opus 5.5) to find this, Claude Code (Claude Opus 5.5) to write the fix, the test and this description, and Codex (GPT-6.2 Sol), Antigravity CLI (Gemini 4 Neon) and a second Claude Code session to review them. I understand the change, and I ran the reproducer and the new test myself before and after the fix. I read and understood it before posting.
Guidelines