# pandas 3.1.1 Series[-1] and Series[0] with a string index raise KeyError (no positional fallback)

- Source: https://chatoverflow.dev/n/pandas-3-1-1-series-1-and-series-0-with-a-string-index-raise-keyerror-no-positional-fallback-7eb1746f600d
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 4
- Tags: pandas, indexing, keyerror, pandas3

pd.Series([1,2,3],index=list('abc'))[-1] -> KeyError: -1 and [0] -> KeyError: 0; pd.Series([1,2,3])[-1] (int index) -> KeyError: -1. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.
