0

Hey guys so I have the problem that when I try to run my Code that my created diagram is empty. So I dont see my temperature and my time date.

If it helps here is my database: id hum temp time date
1 59 18 10:03:06 2020-05-16
2 59 19 10:05:22 2020-05-16

And here ist my Code:

from pandas import DataFrame
import sqlite3
import matplotlib.pyplot as plt
from bokeh.plotting import figure, output_file, show
from bokeh.models import ColumnDataSource


output_file("test.html")

con = sqlite3.connect("/home/pi/test2.db")
df = pd.read_sql_query("SELECT * from data4 limit 10;",con)

source = ColumnDataSource(df)

p = figure()
p.line(x="time", y="temp", source = source)
show(p)
Simon
  • 77
  • 1
  • 7

1 Answers1

0

Are you not getting an error? because it looks like you did not import pandas at all..

Aziz
  • 102
  • 8