question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dates are not correctly recognized

See original GitHub issue

My dates on x-axis

['2019-05-11T00:00:00.000000000' '2019-05-22T00:00:00.000000000'
 '2019-05-23T00:00:00.000000000' '2019-05-24T00:00:00.000000000'
 '2019-05-25T00:00:00.000000000' '2019-05-27T00:00:00.000000000'
 '2019-05-28T00:00:00.000000000' '2019-05-29T00:00:00.000000000'
 '2019-05-30T00:00:00.000000000' '2019-05-31T00:00:00.000000000'
 '2019-06-01T00:00:00.000000000' '2019-05-21T00:00:00.000000000'
 '2019-05-13T00:00:00.000000000']

Dash / Jupyter won’t plot it. However, if it’s offline mode, I can see the visualization correctly from rendered html file. image

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, Oct 28, 2019

@emmanuelle can you take a look at some of the cases above here and LMK if you agree about the “should work” cases and take a look at why they might not be working please?

@Juanlu001 thanks for the interesting and easy to reproduce bug report 😉

0reactions
nicolaskruchtencommented, Oct 28, 2019

px.line(df.set_index("i"), x=df["i"], y="a") # Doesn't work

This is normal because df.set_index("i") results in a new dataframe, without mutating df.

px.line(df.set_index("i"), x=df.set_index("i").index, y="a") # Doesn't work

This in principle should work although it’s really odd because you’re making two copies of df

px.line(df_i, x=df_i.index, y="a") # Doesn't work

This is probably the recommended way, and should work.

This does work:

px.line(df_i, x=df_i.index, y=df.a)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why isn't my data being recognized as Dates?
The first thing to do is to check whether any reformatting is necessary. Obviously, the best case scenario is that the dates are...
Read more >
Excel not recognizing dates properly - Microsoft Community
I have excel 2019. it isn't recognizing dates properly. I have tried changing its date formats. but there is always some issue.
Read more >
How to Fix Excel Dates That Won't Change Format - Contextures
How to fix Excel dates that will not change format. Fix dates that end up in the wrong order when sorted. Use built-in...
Read more >
excel - Some dates recognized as dates, some dates not ...
Right-click on the column header and select Format Cells, the chose Date and select the desired date format.
Read more >
Excel not recognizing dates (or formatting) - YouTube
00:00 Why does Excel not recognize the dates in cells 00:17 Dates that to humans are correct 00:28 Which dates does Excel recognize...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found