df.tail () возвращает:
35114 False False 0.0 False False 0.0 False False 0.0 0.0 0.0 False
35115 False False 0.0 False False 0.0 False False 0.0 0.0 0.0 False
35116 False False 0.0 False False 0.0 False False 0.0 0.0 0.0 False
35117 False False 0.0 False False 0.0 False False 0.0 0.0 0.0 False
35118 False False 0.0 False False 0.0 False False 0.0 0.0 0.0 False
df.iloc [35118] возвращает:
IndexError: single positional indexer is out-of-bounds
df.iloc [[35118]] возвращает:
IndexError: positional indexers are out-of-bounds
df.iloc [[10]] возвращает:
10 False False 0.0 False ....
Не обращайте внимания на .astype (int), который я мог бы сделать, почему этот индекс не может быть создан через индекс, который явно существует?
df.index [-10:] возвращает:
Int64Index([35109, 35110, 35111, 35112, 35113, 35114, 35115, 35116, 35117,
35118], dtype='int64')