If we have a known value in a column, how can we get its index-value? For example:
In [148]: a = pd.DataFrame(np.arange(10).reshape(5,2),columns=[\'c1\',\'c2\'
There might be more than one index map to your value, it make more sense to return a list:
In [48]: a Out[48]: c1 c2 0 0 1 1 2 3 2 4 5 3 6 7 4 8 9 In [49]: a.c1[a.c1 == 8].index.tolist() Out[49]: [4]