"IndexError: positional indexers are out-of-bounds" when they're demonstrably not "IndexError: positional indexers are out-of-bounds" when they're demonstrably not pandas pandas

"IndexError: positional indexers are out-of-bounds" when they're demonstrably not


From Pandas documentation on .iloc (emphasis mine):

Pandas provides a suite of methods in order to get purely integer based indexing. The semantics follow closely python and numpy slicing. These are 0-based indexing.

You're trying to use it by label, which means you need .loc

From your example:

>>>print df_cut.iloc[89]...Name: 99, dtype: float64>>>print df_cut.loc[89]...Name: 89, dtype: float64