plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

Example "Update Button" is broken in: Python > Custom Controls > Custom Buttons

Open MR0205 opened this issue 4 years ago • 0 comments

The code in the example doesn't correctly import the dataset, namely the Data column that is supposed to be index is imported as ordinary column making the following code disfunction in several places.

The fix is to put the line df = df.set_index('Date') just after reading the dataframe:

...
df = pd.read_csv(
    "https://raw.githubusercontent.com/plotly/datasets/master/finance-charts-apple.csv")
df = df.set_index('Date')
...

Cheers.

MR0205 avatar Feb 08 '21 13:02 MR0205