The example here https://plotly.com/python/custom-buttons/#update-button is missing `df = df.set_index('Date')` at the end of the `Load dataset` section and thus does not demo as intended.