logo
Loading...

出現IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match錯誤 - Cupoy

你好,圖是我這堂課的練習,有點奇怪的是,一樣的code,我放到其他的IDE是沒有問題的,可是在jup...

ml100-2-d20,ml100-2

出現IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match錯誤

2019/05/29 上午 10:29
機器學習共學討論版
chiuyuwen
觀看數:19
回答數:3
收藏數:0
ml100-2-d20
ml100-2

你好,圖是我這堂課的練習,有點奇怪的是,一樣的code,我放到其他的IDE是沒有問題的,可是在jupter跑就會出現這個error,想請問該怎麼處理?

IndexingError: Unalignable boolean Series provided as indexer (index of the boolean Series and of the indexed object do not match

回答列表

  • 2019/05/29 下午 10:17
    Jimmy
    贊同數:0
    不贊同數:0
    留言數:1

    Hi chiuyuwen!

    看起來是 df 沒有正確的讀進環境裡? 可以再貼完整的程式碼上來嗎?

  • 2019/05/30 上午 10:12
    張維元 (WeiYuan)
    贊同數:1
    不贊同數:0
    留言數:1

    有可能是你原本檔案的 csv 沒有設好 header,你可以檢查一下你的檔案第一排是不是欄位名稱。

  • 2019/09/11 上午 11:31
    吳明宗
    贊同數:0
    不贊同數:0
    留言數:0

    可以請問是怎麼處理的嗎???一樣遇到此問題,感謝