human
Python Pandas: Get index of rows which column matches certain value
assistant
Here is some code to create a list containing the indexes of rows where the value of column 'BoolCol' in dataframe `df` are equal to True

df.iloc[np.flatnonzero(df['BoolCol'])]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.