I have a pandas dataframe and I need to create a new dataframe only with the rows which satisfy a certain condition. I got these rows indexes using:
position = df.index[df.iloc[:, 0] == value].tolist()
How should I create the new dataframe using only the rows which indexes are in the position variable?