tried this exact code :
import pandas as pd
import numpy as np
from bokeh.models import ColumnDataSource, HoverTool, CDSView, GroupFilter
from datetime import datetime
last_value=100
last_timestamp = datetime.now()
data = ColumnDataSource(dict(timestamp=, value=))
value_df = pd.DataFrame({“value”:last_value,
“timestamp”:last_timestamp}, index=[0])
data.stream(dict(timestamp=value_df[“timestamp”], value=value_df[“value”]), 10)
i get the following error :
TypeError: invalid type promotion
Plz help.
1 Like
Using lists instead of dataframe solved the problem.
···
On Sunday, October 21, 2018 at 10:48:00 PM UTC+5:30, sidbazinga wrote:
tried this exact code :
import pandas as pd
import numpy as np
from bokeh.models import ColumnDataSource, HoverTool, CDSView, GroupFilter
from datetime import datetime
last_value=100
last_timestamp = datetime.now()
data = ColumnDataSource(dict(timestamp=, value=))
value_df = pd.DataFrame({“value”:last_value,
“timestamp”:last_timestamp}, index=[0])
data.stream(dict(timestamp=value_df[“timestamp”], value=value_df[“value”]), 10)
i get the following error :
TypeError: invalid type promotion
Plz help.