看板 Python 關於我們 聯絡資訊
各位大家好,有一個關於pandas的問題請教大家 我有一個dataframe,資料大概長的像以下張照片的上部分,我希望可以調整成照 片中下半部分的樣子。想問問pandas裡面有相關的函數可以做到嗎 http://i.imgur.com/a2Yb7OH.jpg ----- Sent from JPTT on my Xiaomi Redmi Note 4. -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 211.21.228.164 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1552439840.A.B96.html ※ 編輯: aocaoef (140.116.1.136), 03/13/2019 09:24:43
iphone2003: 把它切成前後兩段,後半段做transpose後合併回去 03/13 09:43
jiyu520: pandas melt 03/13 11:22
jiyu520: 試作 https://i.imgur.com/a/DsenbX8 03/13 11:24
aocaoef: 謝謝樓上兩位的指導 03/13 14:47