看板 Python 關於我們 聯絡資訊
因為怕手機打字會造成程式碼與問題描述排版跑掉不方便閱讀,所以附上問題敘述圖片與程式碼、資料圖片,請大家幫忙或建議可能的方向,謝謝! 問題描述: https://i.imgur.com/syO9xmY.jpg 程式碼、dataframe資料: https://i.imgur.com/ZqXPFOT.jpg ----- Sent from JPTT on my iPhone -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.170.94.50 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1628687103.A.A15.html
robert09080: df.isin 看看能不能解決你的問題 08/11 22:12
Talent14: 謝謝R大的資訊,我會再試試看! 08/11 23:11
chickengod: df.loc[df.lo=='tw'].index.tolist() 08/12 07:57
lycantrope: df.loc["C",:] 你都設定name 當index了 08/12 11:51
Talent14: C大的方法可行!我會再查資料熟悉df方法,感謝幫忙! 08/12 20:04