我有一个带有日期时间索引的数据框。我正在尝试使用 Holoview Histogram 函数生成直方图:
df
dt, avg_val
2015-07-07, 20.3
2015-07-08, 20.4
2015-07-09, 10.3
...
df.index
DatetimeIndex(['2015-07-07', '2015-07-08', '2015-07-09', '2015-07-10',
'2015-07-11', '2015-07-12', '2015-07-13', '2015-07-14',
'2015-07-15', '2015-07-16',
...
'2017-03-15', '2017-03-16', '2017-03-17', '2017-03-18',
'2017-03-19', '2017-03-20', '2017-03-21', '2017-03-22',
'2017-03-23', '2017-03-24'],
dtype='datetime64[ns]', name='dt', length=627, freq=None)
hv_d = hv.Dataset(df.reset_index(), kdims=['dt'])
hv.Histogram(hv_d)
TypeError: ufunc 'absolute' did not contain a loop with signature matching types dtype('<M8[ns]') dtype('<M8[ns]')
如何创建此直方图?