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

未關閉
#3,068 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
1/5
預估耗時
1 小時以內
新手友好度
55/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
pandas, python
領域
documentation

研究方向

從 Python > Custom Controls > Custom Buttons 範例開始,檢查 pd.read_csv 附近的資料框載入程式碼。確認 Date 欄是否用作資料框索引,然後執行範例並確認 Update Button 在受影響的位置正常運作。

由索引模型根據 Issue 內容生成。

描述

bug P3

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.

主要語言
Python
星號
18.8k
分支
2.8k
平均合併
16 小時 26 分鐘
30 天內合併 PR
21

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

plotly/plotly.py 的其他 Issue

查看 plotly/plotly.py 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。