I am trying to run the following code, to plot a statistic table on plotly
traceTable = go.Table(
header=dict(values=list(table.columns),
fill=dict(color=’#C2D4FF’),
align=[‘left’] * 5),
cells=dict(values=[table.User, table.Filter, table.SiteCount, table.Mean, table.Median],
fill=dict(color=’#F5F8FF’),
align=[‘left’] * 5))
and I get the following error:
Traceback (most recent call last):
** File “C:/Users/local.Iglesias/PycharmProjects/SQL_ISD_Distro/Generate_ISD_Distro.py”, line 436, in **
** BuildHisto2(outDB, TableTrace)**
** File “C:/Users/local.Iglesias/PycharmProjects/SQL_ISD_Distro/Generate_ISD_Distro.py”, line 327, in BuildHisto2**
** fig.append_trace(traceTable,3,1)**
** File “C:\Software\Anaconda2\lib\site-packages\plotly\graph_objs\graph_objs.py”, line 1277, in append_trace**
** trace[‘xaxis’] = ref[0]**
** File “C:\Software\Anaconda2\lib\site-packages\plotly\graph_objs\graph_objs.py”, line 428, in setitem**
** raise exceptions.PlotlyDictKeyError(self, path)**
plotly.exceptions.PlotlyDictKeyError: ‘xaxis’ is not allowed in 'table’
[ (1,1) x1,y1 ]
Path To Error: [‘xaxis’]
But as far as I understand there is no xaxis in a Table object, so I do not define one…
I have tried the Plotly examples from the website and I still get the same error, so it´s not an issue with the dataframe!..
Thanks!
L