I want to automate a data validation process using Pandas. This involves two steps:
The first is making sure that each row has a valid value for a column. For example, I want to check that in the column 'Independent' that row has either a 1 or a 0, and that it throws a flag if it does not. So if Independent==1 or Independent==0 IndepFlag=0 else IndepFlag=1 (For that row). Based on this flag, I want to print that Row's ID to an excel file.
The second is doing something similar, but checking multiple columns (e.g. if Independent==1 and Column2>1 Column2Flag=1.
My question is, how do I check for a valid value and then capture and print from the column that has the row's ID, and how do I do this with multiple columns?