top of page

Python - Plotly Express Online interactive html graph

Create html graph and use online in html file.



import plotly.express as px

import plotly

import pandas as pd

import plotly.graph_objs as go

jewellery = pd.read_csv("jewellery.csv", index_col=0, parse_dates=True)

jewellery = jewellery.sort_values(by=['Employees'], ascending=False)

jew.head()

fig = px.bar(jewellery,color_discrete_sequence=["lightgrey"],x='Firm Name', y='Employees')

fig.show()

plotly.offline.plot(fig,filename='jewellery.html',config={'displayModeBar': False})

from google.colab import files

files.download('jewellery.html')


Html Output file:











Resources:


https://plotly.com/python/bar-charts/

https://dash.plotly.com

https://stackoverflow.com/questions/49394737/exporting-data-from-google-colab-to-local-machine

22 views0 comments

Recent Posts

See All

コメント


bottom of page