Code: Select all
from dash import Dash, dcc
import plotly.express as px
import pandas as pd
read = pd.read_csv('titanic.csv')
fig = px.pie(read, names="Sex", values="Pclass")
app = Dash(__name__ , title = 'first dashboard')
app.layout = dcc.Graph(figure = fig)
if __name__ == "__main__":
app.run_server(debug = True)