22 lines
495 B
Python
22 lines
495 B
Python
# Import packages
|
|
from dash import Dash, html, dash_table
|
|
import polars as pd
|
|
|
|
# Incorporate data
|
|
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminder2007.csv')
|
|
|
|
# Convert DataFrame to list of dictionaries
|
|
data = df.to_pandas().to_dict('records')
|
|
|
|
# Initialize the app
|
|
app = Dash()
|
|
|
|
# App layout
|
|
app.layout = [
|
|
html.Div(children='My First App with Data'),
|
|
dash_table.DataTable(data=data)
|
|
]
|
|
|
|
# Run the app
|
|
if __name__ == '__main__':
|
|
app.run(debug=True) |