Example "Update Button" is broken in: Python > Custom Controls > Custom Buttons
Open
Nobody has claimed this yet.
bug
P3
- Dominant language
- Python
- Stars
- 18.8k
- Forks
- 2.8k
- Avg merge
- 16h 26m
- Merged PRs (30d)
- 21
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Python > Custom Controls > Custom Buttons example and inspect the dataframe-loading code around pd.read_csv. Verify that the Date column is used as the dataframe index, then run the example and confirm the Update Button works in the affected places.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- pandas, python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100