Consider the data frame
df = pd.DataFrame(numpy.random.randint(0,10,size=(5, 4)), columns=list('ABCD'))
df
A B C D
0 5 8 0 4
1 7 4 9 0
2 8 1 1 8
3 2 7 6 6
4 4 3 3 0
I would like to filter with loc
(the result will be single line) then extract some data out of a certain cell
df.loc[df.A == 7].B
1 4
df.loc[df.A == 7].B.to_string()
'1 4'
The trouble is the index is always getting into the path. How would I get rid of it and/or extract only the cell alone. This example deals with number but I do have columns with other types of data. Any idea ?