熊猫-单个位置索引器越界

时间:2019-08-01 10:36:49

标签: python pandas

我正在使用熊猫,尝试按其索引选择行时遇到奇怪的错误。

df.iloc[1760224]给我:

IndexError: single positional indexer is out-of-bounds

此索引(1760224)存在并且是最后一行,如下所示。

df.index[-1]给了我1760224

df.iloc[-1].name也给了我1760224。

有什么主意吗?

0 个答案:

没有答案