In [2]:
import pandas as pd

In [49]:
exp = pd.read_csv("data/tweetdata.csv")

In [50]:
exp.head()


Out[50]:
day value1 value2 value3
0 1 1 2 5
1 2 6 11 3
2 3 3 8 1
3 4 5 14 6
4 5 10 29 16

In [51]:
exp = pd.concat([exp,pd.DataFrame([[16,2,3,4]],columns=exp.columns)])

In [52]:
from IPython.display import IFrame

In [53]:
with open("Itemplates/Ilinechart.html") as input:
    template = input.read()
template=template.replace("{data}",exp.to_json(orient="records"))
template=template.replace("{width}",str(800))
template=template.replace("{height}",str(800))
with open("tmp/tmpbox.htm","w") as output:
    output.write(template)
IFrame("tmp/tmpbox.htm",900,900)


Out[53]:

In [ ]:


In [ ]: