Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Plotly Express not displaying datetime #5101

Open
Labels
P1needed for current cycle bugsomething broken regressionthis used to work
@Joshua-Powell-Lambda

Description

the x-axis of my graph is displaying as the ns value of the timestamp, 1715000000000000000, instead of the corresponding readable timestamp.

The code is

 fig = go.Figure()
 local_df["reservation_start_week_utc"] = pd.to_datetime(local_df[
 "reservation_start_week_utc"
 ].apply(lambda x: pd.Timestamp(x).to_pydatetime()))
 fig.add_trace(
 go.Scatter(
 x=local_df["reservation_start_week_utc"],
 y=local_df["weighted_average_price"],
...

the datatype of the column that populates my x-axis is datetime64[ns, UTC]
I tried casting to different types, and also several different format settings on the plot. I couldnt get it to work. Rolling back plotly immediately fixed the bug

python versions used 3.13 and 3.10 no difference.

rolling back from plotly 6.0.1 to 5.24.1 fixed the formatting issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1needed for current cycle bugsomething broken regressionthis used to work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /