Hi,
My name is Kim (a Newbie Python coder). I have been trying to create a graph with a piechart and a table has interconnection (see attached image)
However, What I got is only a too large table (see the code below)
import dash
import dash_table
from dash_table.Format import Format, Sign
import pandas as pd
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
df = pd.read_csv('https://docs.google.com/spreadsheets/d/e/2PACX-1vT1BZckjZmge-EOa4WlxrG20Qp_I-7vwiz2TDvWxBxaW1V0LX-R9ipIsUKLuEFH7DyMzQUkCLr_9s_Y/pub?output=csv')
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = dash_table.DataTable(
data=df.to_dict('records'),
sort_action='native',
columns=[
{"name": i, "id": i} for i in df.columns
],
style_table={'height': '1000px', 'overflowY': 'auto'},
style_cell={'fontSize':20, 'font-family':'sans-serif'},
style_header={
'backgroundColor': 'rgb(230, 230, 230)',
'fontWeight': 'bold'},
)
if __name__ == '__main__':
app.run_server(debug=True)
Please advise me how to get the desired graph.
(I know that I need to do 1) app.layout 2) callbacks ,However, I already tried but I could not make it)
2 posts - 2 participants







