all.
I'd like to get 'ID' column value and print them for each row. Currently my code is returning row index + 'ID' column value.
Here's an output:
ID= 0 109 Name: id, dtype: int64 coordinate: [ 75.
20.19276294 2903. ] label: 1
Here's my code:
for i in range(len(X)):
print ("ID=", df['ID'].loc[[i]], "coordinate:" , X[i], "label:", labels[i])
If I print 'ID' column, stored values look like this:
print(df['ID'])
0 109
1 110
2 111
I only want 'ID' values to be printed out, here's what I expect.
ID: 109 coordinate: [ 75. 20.19276294 2903. ] label: 1