Starting from the following code, I'd like to add a legend to this tabular:
from dash import Dash, dash_table
import pandas as pd
df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/solar.csv')
app = Dash(__name__)
app.layout = dash_table.DataTable(df.to_dict('records'), [{"name": i, "id": i} for i in df.columns])
if __name__ == '__main__':
app.run_server(debug=True)
See also: https://dash.plotly.com/datatable
I'd like to have something like this on the bottom of the screen:
Column | Explanation |
---|---|
State | The state for which the data was collected. |
Number of Solar Plants | The total number of solar plants in the state. |
Installed Capacity (MW) | The installed capacity in megawatts. |
Average MW Per Plant | The average power production in megawatts. |
Generation (GWh) | Generated gigawatts per hour. |