Search code examples
pythonpandasbokeh

Bokeh showing epochs on x-asis instead of "normal" dates


I have a little pandas dataframe I like to plot via Bokeh. Everything works fine, except for the x-axis showing a Unix-time (I guess it's that). The dtype of my timestamp-column is datetime64[ns, UTC]. When I print the column, I get "normal" dates : 2020-07-20 17:01:21.181000+00:00

x-axis of Bokeh-plot

I already read some posts on converting the format using pd.datetime, but it's not working.


Solution

  • From https://stackoverflow.com/a/43717871/564509:

    p = figure(..., x_axis_type='datetime', ...)