Running
for index, row in df.iterrows():
print(df.iloc[index,0])
yields the following error:
ValueError: Location based indexing can only have [integer, integer slice (START point is INCLUDED, END point is EXCLUDED), listlike of integers, boolean array] types
Index is 0:
index
Out[57]: '0'
But somehow, my index consists of strings which I can confirm via
type(index)
Out[63]: str
This is although I've applied df.reset_index().
How can I ensure that the index of my df (df.index) consists of integers?
EDIT:
df.index
Out[69]:
Index(['0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
...
'14829', '14830', '14831', '14832', '14833', '14834', '14835', '14836',
'14837', '14838'],
dtype='object', length=14839)