I am working with the OULAD dataset in pandas, and i'm trying to view the labels of some specific rows. For some reason, some indices produce key errors and some do not. code:
labels = info["final_result"].copy()
print(type(labels))
print(labels)
gives the result:
<class 'pandas.core.series.Series'>
21847 Fail
19351 Fail
10841 Withdrawn
4360 Withdrawn
8991 Withdrawn
...
29976 Distinction
629 Withdrawn
7329 Pass
25941 Pass
21098 Pass
Name: final_result, Length: 26074, dtype: object
and, for example
print(labels[10])
prints out:
pass
which is the correct label. However,
print(labels[9])
for whetever reason, results in:
KeyError: 9
any ideas?