我試圖根據其索引(不是位置)來刪除熊貓數據幀行。基於索引與ix的熊貓刪除行
數據幀看起來像
DO
129518 a developer and
20066 responsible for
571 responsible for
85629 responsible for
5956 by helping them
(FYI: 「DO」 是列名)
我要刪除的行,其中的指數是571,所以我做:
df=df.drop(df.index[571])
然後我檢查 df.ix [571]
那麼什麼是地獄,它仍然牛逼這裏!
所以我想「好吧,也許index和ix是不同的!」
In [539]: df.index[571]
17002
我的問題是
1)什麼是指數? (與ix相比)
2)如何使用ix刪除索引行571?