Bokeh Heatmap error: object has no attribute 'split'

时间:2017-06-15 10:20:22

标签: bokeh

Firstly the Bokeh Heatmap google search result is broken. Secondly when I try the Google cache version of the Heatmap code, or for that matter any other examples of the Heatmap code I can find, I keep getting the error:

AttributeError: 'pandas._libs.interval.Interval' object has no attribute 'split'

Am trying to run this in Jupyter and i suspect it's failing on splitting the input data but not sure how to correct.

Is the code wrong, or is it my system that is somehow wrong?

import pandas as pd
from bokeh.charts import HeatMap, output_file, show

z = pd.DataFrame()
z['date'] = ['2016-01-15', '2016-01-13', '2016-01-11', '2016-01-14', '2016-01-15']
z['hour'] = [12, 10, 11, 3, 0]
z['i'] = [1, 1, 1, 1, 1]

output_file('/tmp/test.html')
hm = HeatMap(z, x='date', y='hour', stat='count')
show(hm)

1 个答案:

答案 0 :(得分:2)

Pandas最近推出了一个新版本的重大变化。目前,继续使用<div class="vocabulary-duration">asdf</div>您最好的选择是降级您的Pandas版本。