finding the index of an element in a pandas df

Solutions on MaxInterview for finding the index of an element in a pandas df by the best coders in the world

showing results for - "finding the index of an element in a pandas df"
Betsy
29 May 2020
1In [48]: a
2Out[48]: 
3   c1  c2
40   0   1
51   2   3
62   4   5
73   6   7
84   8   9
9
10In [49]: a.c1[a.c1 == 8].index.tolist()
11Out[49]: [4]