向各位大神求助,本人最近買了一本Pandas for Everyone中文版正在學習,學習到DataFrame這一節有一段寫:

結果我在電腦上聯系,一字不差的敲進去后,卻報錯:

print(scientists.loc[[True,True,False,True]])
IndexError: Boolean index has wrong length: 4 instead of 8
與書中說的有出入,不知道是為什么。
求大神解答。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/194600.html
上一篇:幫幫孩子
