I want to find indexes of some rows same as a array from pandas dataframe.
My dataframe is like below
df = pd.DataFrame({'a':[True, False, True, True],'b':[False, True, True, True],'c':[True, True, False, True],'d':[True, False, True, False]})
the input value that I'll enter is like
row = [True, True, False, True], and I want get [2].
I tried some with for like this
index = []
for i in range df.shape[0]:
if df.iloc[i,:].tolist() == row
index.append(i)
It works but extremely slow for my work. Is there any method for this?