-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Closed
Description
- replace the result of
pip list | grep dashbelow
dash 2.1.0
Describe the Bug
The changelog says
Rearranged Keyword Arguments - data and columns the first two keyword arguments which means they can be supplied as positional arguments without the keyword.
But the following code, based on the example in the changelog under Datatable, throws an error.
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'),id='table')
if __name__ == '__main__':
app.run_server(debug=True)
Error:
Invalid argument `active_cell` passed into DataTable with ID "table".
Expected `object`.
Was supplied type `array`.
Value provided:
[
{
"Average MW Per Plant": 15.3,
"Generation (GWh)": 10826,
"Installed Capacity (MW)": 4395,
"Number of Solar Plants": 289,
"State": "California"
},
{
"Average MW Per Plant": 22.5,
"Generation (GWh)": 2550,
"Installed Capacity (MW)": 1078,
"Number of Solar Plants": 48,
"State": "Arizona"
},.....
Expected behavior
That based on the position of the argument, this would be taken as the data and columns would be generated from the first row.
Metadata
Metadata
Assignees
Labels
No labels