I have a dataframe with 5 rows on which I am doing some validations. If the row does not pass validation, I am adding it to a second dataframe named ValidationFailedDataFrame.
It is OK for the first validation but for the second validation, I want to check if the particular row is already added to the ValidationFailedDataFrame or not and if it is, I want to grab that row and append the error message.
This is how my ValidationFailedDataFrame looks like:
As you can see in the picture, the row that failed the validation was 4th row in the original DataFrame.
How do I query ValidationFailedDataFrame saying give me 4th row of Original DataFrame if you have?

df.iloc[3].tolist()gives me out-of-bound error as there is only one row in the dataframe.df.iloc[0].tolist()works but I would like to access it withdf.iloc[4].tolist()