plotly.py
plotly.py copied to clipboard
Example "Update Button" is broken in: Python > Custom Controls > Custom Buttons
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.