In [2]:
import pandas as pd
In [49]:
exp = pd.read_csv("data/tweetdata.csv")
In [50]:
exp.head()
Out[50]:
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 [ ]: