I have the following DataFrame:
index col0 col1 col2
0 0 1 0
1 1 0 1
2 0 1 1
I would like to extract the following indices(those that contain ones(or any value)):
[(0, 1), (1, 0), (1, 2), (2, 1), (2,2))]
Is there a method in pandas that can do this?