Holoviews Bars with Errors returns TypeError: unsupported operand type(s) for -: 'str' and 'float'

245 Views Asked by At

I try to do a holoviews Bars plot with Errors.

The Bars plot alone is working, but when I add the Errors plot I get the following error message:

TypeError: unsupported operand type(s) for -: 'str' and 'float'

The versions are : bokeh=2.0.2, holoviews=1.13.3

Data in a pandas DataFrame is categorical for Cat1 and Cat2 and float for Value:

    Cat1 Cat2   Value
0   A   C   712.788035
1   A   C   532.259371
2   A   D   381.516398
3   A   D   281.396654
4   B   C   412.779620
5   B   C   281.261148
6   B   D   271.261342
7   B   D   0.000000

my code looks like this:

bars   = hv.Bars(df,kdims=['Cat1','Cat2'], vdims=['Value'])
errors = hv.ErrorBars(df, kdims=['Cat1','Cat2'], vdims=['Value'])
plot = bars * errors
plot
0

There are 0 best solutions below