I’ve been struggling for 3 hours on this issue without any sign of progress. I have a pandas dataframe with a ‘Date’ column. This column’s dtype is datetime64[ns].
Now I simply want to display a scatter/line chart with the date in the xaxis, and another data in the yaxis. So Basically I go:
'data': [go.Scatter( x=df.Date, y=df['CA HT'], text=df.Date, )],
But nothing ever appears on the graph. If I replace the xaxis with a completely different integer-type data, it works. But as soon as I want to display by dates, nothing happens.
I’ve read some other topics where it read “elements must be datetime or string with the ‘YYYY-MM-DD’ format”, so I tried:
'data': [go.Scatter( x=df.Date.dt.strftime('YYYY-MM-DD), y=df['CA HT'], text=df.Date, )],
But it doesnt’ work.
Any help would be greatly appreciated