0

How to show pandas graph to html file?

I have generated the bar graph using below code,

data = [{'index': 0, 'Year_Week': 670, 'Sales_CSVolume': 10},
 {'index': 1, 'Year_Week': 680, 'Sales_CSVolume': 8},
{'index': 2, 'Year_Week': 700, 'Sales_CSVolume': 4},
{'index': 3, 'Year_Week': 850, 'Sales_CSVolume': 13}]

df = pd.DataFrame(data)
df.set_index('index', inplace=True)

img = sns.barplot(data=df, x='Year_Week', y='SalesCSVolume')

output of the code in screenshot below,

enter image description here

Now, I want to show this graph in my test.html file. Can anyone help me to sort out this issue

Satyajit Barik
  • 145
  • 1
  • 1
  • 8

0 Answers0