I have a kolas dataframe and I am trying to find out the index value of a specific record, but I keep getting the error "TypeError: 'Int64Index' object is not subscriptable". Below is the code which I tried.
kdf = ks.DataFrame({
'id':[1,2,3,4],
'A': [None, 3, None, None],
'B': [2, 4, None, 3],
'C': [99, None, None, 1],
'D': [0, 1, 5, 4]
},
columns=['id','A', 'B', 'C', 'D'])
kdf.index[(kdf['id'] == 1)]