p.line(df.index, df['foo'])
p.xaxis.formatter = DatetimeTickFormatter(formats=dict(hours=['%d %B %Y'],
    days=['%d %B %Y'], months=['%d %B %Y'], years=['%d %B %Y']))
p.xaxis.major_label_orientation = pi / 4
output_file('myplot.html')
show(p)
How can I set the x-axis as datetimes on a bokeh plot?