Hey guys just testing out using bokeh to visualise a network
have been trying to use pandas dataframe in ColumnDataSource and its giving me an error that doesn’t make sense
from bokeh.models import ColumnDataSource
code below
from bokeh.models import ColumnDataSource
import numpy as np
import pandas as pd
df = pd.DataFrame(data=np.zeros((8,8)), columns=["a", "b", "c", "d", "e", "f", "g", "h"])
source = ColumnDataSource(data=df)
error from this
--------------------------------------------------------------------------
ValueError: expected a dict or pandas.DataFrame, got a b c d e f g h
0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
6 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
7 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
any idea whats the reason for this?